← Back to team overview

testtools-dev team mailing list archive

[Bug 666306] Re: Test suite shouldn't depend on twisted

 

** Changed in: testtools
       Status: Fix Committed => Fix Released

-- 
You received this bug notification because you are a member of testtools
developers, which is subscribed to testtools.
https://bugs.launchpad.net/bugs/666306

Title:
  Test suite shouldn't depend on twisted

Status in testtools:
  Fix Released

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





References