From 75e89a352eebced4d07f344f1001f3e7cb3cad10 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Miro=20Hron=C4=8Dok?= Date: Mon, 12 Jul 2021 15:49:39 +0200 Subject: [PATCH] Adjust enum reprs conditional from Python 3.10 to 3.11 The change was reverted and postponed: https://mail.python.org/archives/list/python-dev@python.org/message/LSTMFAPSPD3BGZ4D6HQFODXZVB3PLYKF/ --- testing/python/metafunc.py | 2 +- testing/test_pytester.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/testing/python/metafunc.py b/testing/python/metafunc.py index ce689e56d77..4b3173efe40 100644 --- a/testing/python/metafunc.py +++ b/testing/python/metafunc.py @@ -448,7 +448,7 @@ def test_idmaker_enum(self) -> None: enum = pytest.importorskip("enum") e = enum.Enum("Foo", "one, two") result = idmaker(("a", "b"), [pytest.param(e.one, e.two)]) - if sys.version_info[:2] >= (3, 10): + if sys.version_info[:2] >= (3, 11): assert result == ["one-two"] else: assert result == ["Foo.one-Foo.two"] diff --git a/testing/test_pytester.py b/testing/test_pytester.py index 19f28504d88..c7e055dcdee 100644 --- a/testing/test_pytester.py +++ b/testing/test_pytester.py @@ -744,7 +744,7 @@ def test_run_result_repr() -> None: # known exit code r = pytester_mod.RunResult(1, outlines, errlines, duration=0.5) - if sys.version_info[:2] >= (3, 10): + if sys.version_info[:2] >= (3, 11): assert repr(r) == ( ""