diff --git a/testing/test_doctest.py b/testing/test_doctest.py index 828253d32..2f73feb8c 100644 --- a/testing/test_doctest.py +++ b/testing/test_doctest.py @@ -223,7 +223,11 @@ class TestDoctests: "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 "", line 1, in ', "ZeroDivisionError: division by zero", "*/test_doctest_unexpected_exception.txt:2: UnexpectedException", diff --git a/testing/test_main.py b/testing/test_main.py index 2df51bb7b..715976267 100644 --- a/testing/test_main.py +++ b/testing/test_main.py @@ -47,7 +47,7 @@ def test_wrap_session_notify_exception(ret_exc, pytester: Pytester) -> None: 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:] ) @@ -57,7 +57,7 @@ def test_wrap_session_notify_exception(ret_exc, pytester: Pytester) -> None: '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", @@ -68,7 +68,7 @@ def test_wrap_session_notify_exception(ret_exc, pytester: Pytester) -> None: '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",