From d18a29eb9ada73cee1e52a23be1cb3df57d5f0ed Mon Sep 17 00:00:00 2001 From: Bruno Oliveira Date: Fri, 11 Feb 2022 11:37:37 -0300 Subject: [PATCH] Revert "python 3.11 fixes: enum repr changed" This reverts commit 316090eb5c753e0e0317e4b2c84d141eae8c005f. --- testing/python/metafunc.py | 5 +---- testing/test_pytester.py | 14 ++++---------- 2 files changed, 5 insertions(+), 14 deletions(-) diff --git a/testing/python/metafunc.py b/testing/python/metafunc.py index 97678abce..b6ad4a809 100644 --- a/testing/python/metafunc.py +++ b/testing/python/metafunc.py @@ -488,10 +488,7 @@ class TestMetafunc: result = IdMaker( ("a", "b"), [pytest.param(e.one, e.two)], None, None, None, None ).make_unique_parameterset_ids() - if sys.version_info >= (3, 11): - assert result == ["one-two"] - else: - assert result == ["Foo.one-Foo.two"] + assert result == ["Foo.one-Foo.two"] def test_idmaker_idfn(self) -> None: """#351""" diff --git a/testing/test_pytester.py b/testing/test_pytester.py index d0ec1293c..9f7cf42b7 100644 --- a/testing/test_pytester.py +++ b/testing/test_pytester.py @@ -743,16 +743,10 @@ def test_run_result_repr() -> None: # known exit code r = pytester_mod.RunResult(1, outlines, errlines, duration=0.5) - if sys.version_info >= (3, 11): - assert ( - repr(r) == "" - ) - else: - assert ( - repr(r) == "" - ) + assert ( + repr(r) == "" + ) # unknown exit code: just the number r = pytester_mod.RunResult(99, outlines, errlines, duration=0.5)