diff --git a/testing/python/metafunc.py b/testing/python/metafunc.py index ce689e56d77..4a4b141c4b7 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 19f28504d88..7b16c69c23d 100644 --- a/testing/test_pytester.py +++ b/testing/test_pytester.py @@ -744,16 +744,10 @@ 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): - 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)