Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit3b741ee

Browse files
Oleg GurevSofia Kopikova
Oleg Gurev
authored and
Sofia Kopikova
committed
[PBCKP-804] Test_AssertionError_Python3.11 (no attribute 'errors')
1 parent2fd0dda commit3b741ee

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

‎tests/helpers/ptrack_helpers.py

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -423,8 +423,12 @@ def is_test_result_ok(test_case):
423423
result=test_case.defaultTestResult()# These two methods have no side effects
424424
test_case._feedErrorsToResult(result,test_case._outcome.errors)
425425
else:
426-
# Python 3.11+
426+
# Python 3.11+ and pytest 5.3.5+
427427
result=test_case._outcome.result
428+
ifnothasattr(result,'errors'):
429+
result.errors= []
430+
ifnothasattr(result,'failures'):
431+
result.failures= []
428432
else:# Python 2.7, 3.0-3.3
429433
result=getattr(test_case,'_outcomeForDoCleanups',test_case._resultForDoCleanups)
430434

@@ -2252,4 +2256,4 @@ def __init__(self, is_datafile: bool):
22522256
self.is_datafile=is_datafile
22532257

22542258
classContentDir(object):
2255-
__slots__= ('mode')
2259+
__slots__= ('mode')

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp