You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Traceback (most recent call last):
File "/home/rdmurray/python/bzr/email6-local/Lib/test/regrtest.py", line 857, in runtest_inner
indirect_test()
File "/home/rdmurray/python/bzr/email6-local/Lib/test/test_email.py", line 10, in test_main
tests = unittest.defaultTestLoader.discover(testdir, top_level_dir=libdir)
File "/home/rdmurray/python/bzr/email6-local/Lib/unittest/loader.py", line 179, in discoverreturnself.suiteClass(tests)
File "/home/rdmurray/python/bzr/email6-local/Lib/unittest/suite.py", line 18, in __init__self.addTests(tests)
File "/home/rdmurray/python/bzr/email6-local/Lib/unittest/suite.py", line 54, in addTestsself.addTest(test)
File "/home/rdmurray/python/bzr/email6-local/Lib/unittest/suite.py", line 43, in addTestraiseTypeError("{} is not callable".format(test))
TypeError: [<unittest.suite.TestSuite tests=[]>, <unittest.suite.TestSuite tests=[]>, <unittest.suite.TestSuite tests=[]>] is not callable
(Well, that's after I enhanced the normal error message, which just says that 'test must be a callable')
I see that loadTestsFromModule wraps what is passes as standard_tests in self.suiteClass before returning it, whereas it returns whatever load_tests returns directly. Perhaps the wrapping needs to be done in both cases, or perhaps standard_tests should be wrapped before being passed to the module's load_tests?
My load_tests is a function in a test module, not a package __init__.
Note: these values reflect the state of the issue at the time it was migrated and might not reflect the current state.
Show more details
GitHub fields:
bugs.python.org fields:
The text was updated successfully, but these errors were encountered: