move tests to separage package (not included in sdist)
This commit is contained in:
		
						commit
						d62e7d3c47
					
				| 
						 | 
					@ -1,6 +1,10 @@
 | 
				
			||||||
[run]
 | 
					[run]
 | 
				
			||||||
# only record trace data for wormhole.*
 | 
					# only record trace data for wormhole.*
 | 
				
			||||||
source = wormhole
 | 
					source =
 | 
				
			||||||
 | 
					   wormhole
 | 
				
			||||||
 | 
					   txwormhole
 | 
				
			||||||
 | 
					   wormhole_cli
 | 
				
			||||||
 | 
					   wormhole_server
 | 
				
			||||||
# and don't trace the test files themselves, or Versioneer's stuff
 | 
					# and don't trace the test files themselves, or Versioneer's stuff
 | 
				
			||||||
omit =
 | 
					omit =
 | 
				
			||||||
   src/wormhole/test/*
 | 
					   src/wormhole/test/*
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
							
								
								
									
										1
									
								
								setup.py
									
									
									
									
									
								
							
							
						
						
									
										1
									
								
								setup.py
									
									
									
									
									
								
							| 
						 | 
					@ -17,7 +17,6 @@ setup(name="magic-wormhole",
 | 
				
			||||||
                "wormhole.blocking",
 | 
					                "wormhole.blocking",
 | 
				
			||||||
                "txwormhole",
 | 
					                "txwormhole",
 | 
				
			||||||
                "wormhole_cli",
 | 
					                "wormhole_cli",
 | 
				
			||||||
                "wormhole.test",
 | 
					 | 
				
			||||||
                "wormhole_server"],
 | 
					                "wormhole_server"],
 | 
				
			||||||
      package_data={"wormhole_server": ["db-schemas/*.sql"]},
 | 
					      package_data={"wormhole_server": ["db-schemas/*.sql"]},
 | 
				
			||||||
      entry_points={"console_scripts":
 | 
					      entry_points={"console_scripts":
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -3,7 +3,7 @@ from twisted.internet import reactor, defer
 | 
				
			||||||
from twisted.python import log
 | 
					from twisted.python import log
 | 
				
			||||||
from txwormhole.transit import allocate_tcp_port
 | 
					from txwormhole.transit import allocate_tcp_port
 | 
				
			||||||
from wormhole_server.server import RelayServer
 | 
					from wormhole_server.server import RelayServer
 | 
				
			||||||
from .. import __version__
 | 
					from wormhole import __version__
 | 
				
			||||||
 | 
					
 | 
				
			||||||
class ServerBase:
 | 
					class ServerBase:
 | 
				
			||||||
    def setUp(self):
 | 
					    def setUp(self):
 | 
				
			||||||
| 
						 | 
					@ -3,9 +3,9 @@ import json
 | 
				
			||||||
from twisted.trial import unittest
 | 
					from twisted.trial import unittest
 | 
				
			||||||
from twisted.internet.defer import gatherResults, succeed
 | 
					from twisted.internet.defer import gatherResults, succeed
 | 
				
			||||||
from twisted.internet.threads import deferToThread
 | 
					from twisted.internet.threads import deferToThread
 | 
				
			||||||
from ..blocking.transcribe import (Wormhole, UsageError, ChannelManager,
 | 
					from wormhole.blocking.transcribe import (Wormhole, UsageError, ChannelManager,
 | 
				
			||||||
                                   WrongPasswordError)
 | 
					                                          WrongPasswordError)
 | 
				
			||||||
from ..blocking.eventsource import EventSourceFollower
 | 
					from wormhole.blocking.eventsource import EventSourceFollower
 | 
				
			||||||
from .common import ServerBase
 | 
					from .common import ServerBase
 | 
				
			||||||
 | 
					
 | 
				
			||||||
APPID = u"appid"
 | 
					APPID = u"appid"
 | 
				
			||||||
| 
						 | 
					@ -3,7 +3,7 @@ from twisted.trial import unittest
 | 
				
			||||||
from twisted.internet.defer import gatherResults
 | 
					from twisted.internet.defer import gatherResults
 | 
				
			||||||
from twisted.internet.threads import deferToThread
 | 
					from twisted.internet.threads import deferToThread
 | 
				
			||||||
from txwormhole.transcribe import Wormhole as twisted_Wormhole
 | 
					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
 | 
					from .common import ServerBase
 | 
				
			||||||
 | 
					
 | 
				
			||||||
# make sure the two implementations (Twisted-style and blocking-style) can
 | 
					# make sure the two implementations (Twisted-style and blocking-style) can
 | 
				
			||||||
| 
						 | 
					@ -4,12 +4,12 @@ from twisted.trial import unittest
 | 
				
			||||||
from twisted.python import procutils, log
 | 
					from twisted.python import procutils, log
 | 
				
			||||||
from twisted.internet.utils import getProcessOutputAndValue
 | 
					from twisted.internet.utils import getProcessOutputAndValue
 | 
				
			||||||
from twisted.internet.defer import inlineCallbacks
 | 
					from twisted.internet.defer import inlineCallbacks
 | 
				
			||||||
from .. import __version__
 | 
					from wormhole import __version__
 | 
				
			||||||
from .common import ServerBase
 | 
					from .common import ServerBase
 | 
				
			||||||
from wormhole_cli import runner, cmd_send, cmd_receive
 | 
					from wormhole_cli import runner, cmd_send, cmd_receive
 | 
				
			||||||
from wormhole_cli.cmd_send import build_phase1_data
 | 
					from wormhole_cli.cmd_send import build_phase1_data
 | 
				
			||||||
from ..errors import TransferError
 | 
					from wormhole.errors import TransferError
 | 
				
			||||||
from ..timing import DebugTiming
 | 
					from wormhole.timing import DebugTiming
 | 
				
			||||||
 | 
					
 | 
				
			||||||
class Phase1Data(unittest.TestCase):
 | 
					class Phase1Data(unittest.TestCase):
 | 
				
			||||||
    def test_text(self):
 | 
					    def test_text(self):
 | 
				
			||||||
| 
						 | 
					@ -8,7 +8,7 @@ from twisted.internet import protocol, reactor, defer
 | 
				
			||||||
from twisted.internet.threads import deferToThread
 | 
					from twisted.internet.threads import deferToThread
 | 
				
			||||||
from twisted.internet.endpoints import clientFromString, connectProtocol
 | 
					from twisted.internet.endpoints import clientFromString, connectProtocol
 | 
				
			||||||
from twisted.web.client import getPage, Agent, readBody
 | 
					from twisted.web.client import getPage, Agent, readBody
 | 
				
			||||||
from .. import __version__
 | 
					from wormhole import __version__
 | 
				
			||||||
from .common import ServerBase
 | 
					from .common import ServerBase
 | 
				
			||||||
from wormhole_server import relay_server, transit_server
 | 
					from wormhole_server import relay_server, transit_server
 | 
				
			||||||
from txwormhole.eventsource import EventSource
 | 
					from txwormhole.eventsource import EventSource
 | 
				
			||||||
| 
						 | 
					@ -7,7 +7,7 @@ from twisted.internet.defer import gatherResults, inlineCallbacks
 | 
				
			||||||
from twisted.python import log, failure
 | 
					from twisted.python import log, failure
 | 
				
			||||||
from twisted.test import proto_helpers
 | 
					from twisted.test import proto_helpers
 | 
				
			||||||
from txwormhole import transit
 | 
					from txwormhole import transit
 | 
				
			||||||
from ..errors import UsageError
 | 
					from wormhole.errors import UsageError
 | 
				
			||||||
from nacl.secret import SecretBox
 | 
					from nacl.secret import SecretBox
 | 
				
			||||||
from nacl.exceptions import CryptoError
 | 
					from nacl.exceptions import CryptoError
 | 
				
			||||||
 | 
					
 | 
				
			||||||
							
								
								
									
										4
									
								
								tox.ini
									
									
									
									
									
								
							
							
						
						
									
										4
									
								
								tox.ini
									
									
									
									
									
								
							| 
						 | 
					@ -21,9 +21,9 @@ deps =
 | 
				
			||||||
    pyflakes
 | 
					    pyflakes
 | 
				
			||||||
    {env:EXTRA_DEPENDENCY:}
 | 
					    {env:EXTRA_DEPENDENCY:}
 | 
				
			||||||
commands =
 | 
					commands =
 | 
				
			||||||
    pyflakes setup.py src
 | 
					    pyflakes setup.py src tests
 | 
				
			||||||
    wormhole --version
 | 
					    wormhole --version
 | 
				
			||||||
    trial {posargs:wormhole}
 | 
					    trial {posargs:tests}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
# on windows, trial is installed as venv/bin/trial.py, not .exe, but (at
 | 
					# 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
 | 
					# least appveyor) adds .PY to $PATHEXT. So "trial wormhole" might work on
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
		Loading…
	
		Reference in New Issue
	
	Block a user