← Back to team overview

testtools-dev team mailing list archive

[Bug 657760] Re: runTest argument to TestCase unusable

 

** Branch linked: lp:~jml/testtools/deferred-support

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

Status in testtools: Triaged

Bug description:
If you pass 'runTest' in to the constructor of testtools.TestCase, you'll get a TypeError, since the runTest keyword argument is passed upwards to unittest.TestCase.

Traceback (most recent call last):
  File "testtools/tests/test_foo.py", line 165, in test_runner
    test = TestCase('test_something', runTest=runner)
  File "testtools/testcase.py", line 81, in __init__
    unittest.TestCase.__init__(self, *args, **kwargs)
TypeError: __init__() got an unexpected keyword argument 'runTest'

Note that the documentation for testtools.TestCase.__init__ says that it's acceptable to pass in runTest, and that this is currently the only documented way to use a different test runner.





References