Skip to content

Commit

Permalink
Merge pull request pytest-dev#10132 from hroncok/python3.11.0b4
Browse files Browse the repository at this point in the history
  • Loading branch information
nicoddemus committed Jul 14, 2022
2 parents c2b1d5b + 09b2c95 commit cbcb3a3
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 4 deletions.
6 changes: 5 additions & 1 deletion testing/test_doctest.py
Expand Up @@ -223,7 +223,11 @@ def test_doctest_unexpected_exception(self, pytester: Pytester):
"Traceback (most recent call last):",
' File "*/doctest.py", line *, in __run',
" *",
*((" *^^^^*",) if sys.version_info >= (3, 11) else ()),
*(
(" *^^^^*",)
if (3, 11, 0, "beta", 4) > sys.version_info >= (3, 11)
else ()
),
' File "<doctest test_doctest_unexpected_exception.txt[1]>", line 1, in <module>',
"ZeroDivisionError: division by zero",
"*/test_doctest_unexpected_exception.txt:2: UnexpectedException",
Expand Down
6 changes: 3 additions & 3 deletions testing/test_main.py
Expand Up @@ -47,7 +47,7 @@ def pytest_internalerror(excrepr, excinfo):

end_lines = (
result.stdout.lines[-4:]
if sys.version_info >= (3, 11)
if (3, 11, 0, "beta", 4) > sys.version_info >= (3, 11)
else result.stdout.lines[-3:]
)

Expand All @@ -57,7 +57,7 @@ def pytest_internalerror(excrepr, excinfo):
'INTERNALERROR> raise SystemExit("boom")',
*(
("INTERNALERROR> ^^^^^^^^^^^^^^^^^^^^^^^^",)
if sys.version_info >= (3, 11)
if (3, 11, 0, "beta", 4) > sys.version_info >= (3, 11)
else ()
),
"INTERNALERROR> SystemExit: boom",
Expand All @@ -68,7 +68,7 @@ def pytest_internalerror(excrepr, excinfo):
'INTERNALERROR> raise ValueError("boom")',
*(
("INTERNALERROR> ^^^^^^^^^^^^^^^^^^^^^^^^",)
if sys.version_info >= (3, 11)
if (3, 11, 0, "beta", 4) > sys.version_info >= (3, 11)
else ()
),
"INTERNALERROR> ValueError: boom",
Expand Down

0 comments on commit cbcb3a3

Please sign in to comment.