Skip to content

Commit

Permalink
move tests step 2: fix imports, setup.py, tox.ini
Browse files Browse the repository at this point in the history
  • Loading branch information
warner committed Apr 18, 2016
1 parent 95706c7 commit f9e3b83
Show file tree
Hide file tree
Showing 8 changed files with 12 additions and 13 deletions.
1 change: 0 additions & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,6 @@
"wormhole.blocking",
"txwormhole",
"wormhole_cli",
"wormhole.test",
"wormhole_server"],
package_data={"wormhole_server": ["db-schemas/*.sql"]},
entry_points={"console_scripts":
Expand Down
2 changes: 1 addition & 1 deletion tests/common.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
from twisted.python import log
from txwormhole.transit import allocate_tcp_port
from wormhole_server.server import RelayServer
from .. import __version__
from wormhole import __version__

class ServerBase:
def setUp(self):
Expand Down
6 changes: 3 additions & 3 deletions tests/test_blocking.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,9 @@
from twisted.trial import unittest
from twisted.internet.defer import gatherResults, succeed
from twisted.internet.threads import deferToThread
from ..blocking.transcribe import (Wormhole, UsageError, ChannelManager,
WrongPasswordError)
from ..blocking.eventsource import EventSourceFollower
from wormhole.blocking.transcribe import (Wormhole, UsageError, ChannelManager,
WrongPasswordError)
from wormhole.blocking.eventsource import EventSourceFollower
from .common import ServerBase

APPID = u"appid"
Expand Down
2 changes: 1 addition & 1 deletion tests/test_interop.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
from twisted.internet.defer import gatherResults
from twisted.internet.threads import deferToThread
from txwormhole.transcribe import Wormhole as twisted_Wormhole
from ..blocking.transcribe import Wormhole as blocking_Wormhole
from wormhole.blocking.transcribe import Wormhole as blocking_Wormhole
from .common import ServerBase

# make sure the two implementations (Twisted-style and blocking-style) can
Expand Down
6 changes: 3 additions & 3 deletions tests/test_scripts.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,12 +4,12 @@
from twisted.python import procutils, log
from twisted.internet.utils import getProcessOutputAndValue
from twisted.internet.defer import inlineCallbacks
from .. import __version__
from wormhole import __version__
from .common import ServerBase
from wormhole_cli import runner, cmd_send, cmd_receive
from wormhole_cli.cmd_send import build_phase1_data
from ..errors import TransferError
from ..timing import DebugTiming
from wormhole.errors import TransferError
from wormhole.timing import DebugTiming

class Phase1Data(unittest.TestCase):
def test_text(self):
Expand Down
2 changes: 1 addition & 1 deletion tests/test_server.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
from twisted.internet.threads import deferToThread
from twisted.internet.endpoints import clientFromString, connectProtocol
from twisted.web.client import getPage, Agent, readBody
from .. import __version__
from wormhole import __version__
from .common import ServerBase
from wormhole_server import relay_server, transit_server
from txwormhole.eventsource import EventSource
Expand Down
2 changes: 1 addition & 1 deletion tests/test_transit_twisted.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
from twisted.python import log, failure
from twisted.test import proto_helpers
from txwormhole import transit
from ..errors import UsageError
from wormhole.errors import UsageError
from nacl.secret import SecretBox
from nacl.exceptions import CryptoError

Expand Down
4 changes: 2 additions & 2 deletions tox.ini
Original file line number Diff line number Diff line change
Expand Up @@ -21,9 +21,9 @@ deps =
pyflakes
{env:EXTRA_DEPENDENCY:}
commands =
pyflakes setup.py src
pyflakes setup.py src tests
wormhole --version
trial {posargs:wormhole}
trial {posargs:tests}

# on windows, trial is installed as venv/bin/trial.py, not .exe, but (at
# least appveyor) adds .PY to $PATHEXT. So "trial wormhole" might work on
Expand Down

0 comments on commit f9e3b83

Please sign in to comment.