mirror of
https://github.com/GothenburgBitFactory/taskwarrior.git
synced 2025-08-19 19:03:07 +02:00
TAP: Don't fail on errors during setUpClass
This commit is contained in:
parent
580754a65a
commit
52746e8504
1 changed files with 6 additions and 1 deletions
|
@ -66,7 +66,12 @@ class TAPTestResult(unittest.result.TestResult):
|
||||||
if self.descriptions and doc_first_line:
|
if self.descriptions and doc_first_line:
|
||||||
return doc_first_line
|
return doc_first_line
|
||||||
else:
|
else:
|
||||||
return "{0} ({1})".format(test._testMethodName, test.__class__.__name__)
|
try:
|
||||||
|
method = test._testMethodName
|
||||||
|
except AttributeError:
|
||||||
|
return "Preparation error on: {0}".format(test.description)
|
||||||
|
else:
|
||||||
|
return "{0} ({1})".format(method, test.__class__.__name__)
|
||||||
|
|
||||||
def startTestRun(self, total="unk"):
|
def startTestRun(self, total="unk"):
|
||||||
self.stream.writeln("1..{0}".format(total))
|
self.stream.writeln("1..{0}".format(total))
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue