testtools-dev team mailing list archive
-
testtools-dev team
-
Mailing list archive
-
Message #00210
[Bug 666306] [NEW] Test suite shouldn't depend on twisted
Public bug reported:
In rev 115 the twisted-related tests were nicely made optional by
swallowing an the import error. However, rev 114 switched
functools.wraps for twisted.python.util.mergeFunctionMetadata so the
test suite still fails to import if twisted is not installed:
Traceback (most recent call last):
File "C:\mozilla-build\python25\lib\runpy.py", line 95, in run_module
filename, loader, alter_sys)
File "C:\mozilla-build\python25\lib\runpy.py", line 52, in _run_module_code
mod_name, mod_fname, mod_loader)
File "C:\mozilla-build\python25\lib\runpy.py", line 32, in _run_code
exec code in run_globals
File "C:\bzr\testtools\testtools\run.py", line 280, in <module>
program = TestProgram(argv=sys.argv, testRunner=runner)
File "C:\bzr\testtools\testtools\run.py", line 133, in __init__
self.parseArgs(argv)
File "C:\bzr\testtools\testtools\run.py", line 188, in parseArgs
self.createTests()
File "C:\bzr\testtools\testtools\run.py", line 197, in createTests
self.module)
File "C:\mozilla-build\python25\lib\unittest.py", line 556, in loadTestsFromNames
suites = [self.loadTestsFromName(name, module) for name in names]
File "C:\mozilla-build\python25\lib\unittest.py", line 544, in loadTestsFromName
test = obj()
File "testtools\tests\__init__.py", line 9, in test_suite
from testtools.tests import (
File "testtools\tests\test_runtest.py", line 5, in <module>
from twisted.python.util import mergeFunctionMetadata
ImportError: No module named twisted.python.util
** Affects: testtools
Importance: Undecided
Status: New
--
Test suite shouldn't depend on twisted
https://bugs.launchpad.net/bugs/666306
You received this bug notification because you are a member of testtools
developers, which is subscribed to testtools.
Status in testtools: New
Bug description:
In rev 115 the twisted-related tests were nicely made optional by swallowing an the import error. However, rev 114 switched functools.wraps for twisted.python.util.mergeFunctionMetadata so the test suite still fails to import if twisted is not installed:
Traceback (most recent call last):
File "C:\mozilla-build\python25\lib\runpy.py", line 95, in run_module
filename, loader, alter_sys)
File "C:\mozilla-build\python25\lib\runpy.py", line 52, in _run_module_code
mod_name, mod_fname, mod_loader)
File "C:\mozilla-build\python25\lib\runpy.py", line 32, in _run_code
exec code in run_globals
File "C:\bzr\testtools\testtools\run.py", line 280, in <module>
program = TestProgram(argv=sys.argv, testRunner=runner)
File "C:\bzr\testtools\testtools\run.py", line 133, in __init__
self.parseArgs(argv)
File "C:\bzr\testtools\testtools\run.py", line 188, in parseArgs
self.createTests()
File "C:\bzr\testtools\testtools\run.py", line 197, in createTests
self.module)
File "C:\mozilla-build\python25\lib\unittest.py", line 556, in loadTestsFromNames
suites = [self.loadTestsFromName(name, module) for name in names]
File "C:\mozilla-build\python25\lib\unittest.py", line 544, in loadTestsFromName
test = obj()
File "testtools\tests\__init__.py", line 9, in test_suite
from testtools.tests import (
File "testtools\tests\test_runtest.py", line 5, in <module>
from twisted.python.util import mergeFunctionMetadata
ImportError: No module named twisted.python.util
Follow ups
References