StartUpFailure raises when id() called
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
zope.testrunner |
Fix Released
|
Undecided
|
Unassigned |
Bug Description
StartUpFailure is an empty test case added to indicate import failures, which is great. However, calling id() on a StartUpFailure raises an exception like this:
Traceback (most recent call last):
File "./bin/test", line 267, in <module>
testrunner.
File "/home/
failed = run_internal(
File "/home/
runner.run()
File "/home/
feature.
File "/home/
tests = find_tests(
File "/home/
return hook(real_
File "/home/
return hook(real_
File "/home/
if test.id() in tests:
File "/usr/lib/
return "%s.%s" % (_strclass(
AttributeError: 'StartUpFailure' object has no attribute '_testMethodName'
Although the API isn't as well-documented as it could be, it's very reasonable for testing tools to expect TestCase objects to provide an id() method that returns a byte-string and doesn't raise.
This is almost identical to bug 221151.