We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 2fd0dda commit 3b741eeCopy full SHA for 3b741ee
tests/helpers/ptrack_helpers.py
@@ -423,8 +423,12 @@ def is_test_result_ok(test_case):
423
result = test_case.defaultTestResult() # These two methods have no side effects
424
test_case._feedErrorsToResult(result, test_case._outcome.errors)
425
else:
426
- # Python 3.11+
+ # Python 3.11+ and pytest 5.3.5+
427
result = test_case._outcome.result
428
+ if not hasattr(result, 'errors'):
429
+ result.errors = []
430
+ if not hasattr(result, 'failures'):
431
+ result.failures = []
432
else: # Python 2.7, 3.0-3.3
433
result = getattr(test_case, '_outcomeForDoCleanups', test_case._resultForDoCleanups)
434
@@ -2252,4 +2256,4 @@ def __init__(self, is_datafile: bool):
2252
2256
self.is_datafile = is_datafile
2253
2257
2254
2258
class ContentDir(object):
2255
- __slots__ = ('mode')
2259
+ __slots__ = ('mode')
0 commit comments