testloader does not help with modules that cannot be imported
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Testrepository |
Invalid
|
Wishlist
|
Unassigned | ||
testtools |
Triaged
|
Wishlist
|
Unassigned |
Bug Description
When running testr's own tests using testr, when there's some kind of failure preventing one of the tests from importing correctly, you get an error like this:
$ testr run
running=python -m subunit.run testrepository.
Traceback (most recent call last):
File "/usr/lib/
"__main__", fname, loader, pkg_name)
File "/usr/lib/
exec code in run_globals
File "/usr/lib/
SubunitTest
File "/usr/lib/
self.
File "/usr/lib/
self.
File "/usr/lib/
self.module)
File "/usr/lib/
suites = [self.loadTests
File "/usr/lib/
test = obj()
File "testrepository
suite = loader.
File "/usr/lib/
suites = [self.loadTests
File "/usr/lib/
parent, obj = obj, getattr(obj, part)
AttributeError: 'module' object has no attribute 'test_arguments'
id=2, tests=0
Many other test runners (e.g. trial, zope.testrunner) do substantially better than this.
Changed in testtools: | |
importance: | High → Wishlist |
This needs testtools help.