mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
PY-19907: check `startTime` property type. If it has wrong type, that means user has custom property. Fail and report this fact.
This commit is contained in:
@@ -211,6 +211,8 @@ class TeamcityTestResult(TestResult):
|
||||
|
||||
def __getDuration(self, test):
|
||||
start = getattr(test, "startTime", datetime.datetime.now())
|
||||
assert isinstance(start, datetime.datetime), \
|
||||
"You testcase has property named 'startTime' (value {0}). Please, rename it".format(start)
|
||||
d = datetime.datetime.now() - start
|
||||
duration = d.microseconds / 1000 + d.seconds * 1000 + d.days * 86400000
|
||||
return duration
|
||||
|
||||
Reference in New Issue
Block a user