diff --git a/testing/python/metafunc.py b/testing/python/metafunc.py index 21ab2267e2f..676f1d988bc 100644 --- a/testing/python/metafunc.py +++ b/testing/python/metafunc.py @@ -448,10 +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): - 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 4234cdf6ead..f2e8dd5a36a 100644 --- a/testing/test_pytester.py +++ b/testing/test_pytester.py @@ -741,16 +741,10 @@ def test_run_result_repr() -> None: # known exit code r = pytester.RunResult(1, outlines, errlines, duration=0.5) - if sys.version_info[:2] >= (3, 10): - assert repr(r) == ( - "" - ) - else: - assert repr(r) == ( - "" - ) + assert ( + repr(r) == "" + ) # unknown exit code: just the number r = pytester.RunResult(99, outlines, errlines, duration=0.5)