diff --git a/testing/python/metafunc.py b/testing/python/metafunc.py index b6ad4a809..97678abce 100644 --- a/testing/python/metafunc.py +++ b/testing/python/metafunc.py @@ -488,7 +488,10 @@ class TestMetafunc: result = IdMaker( ("a", "b"), [pytest.param(e.one, e.two)], None, None, None, None ).make_unique_parameterset_ids() - assert result == ["Foo.one-Foo.two"] + if sys.version_info >= (3, 11): + assert result == ["one-two"] + else: + 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 9f7cf42b7..d0ec1293c 100644 --- a/testing/test_pytester.py +++ b/testing/test_pytester.py @@ -743,10 +743,16 @@ def test_run_result_repr() -> None: # known exit code r = pytester_mod.RunResult(1, outlines, errlines, duration=0.5) - assert ( - repr(r) == "" - ) + if sys.version_info >= (3, 11): + assert ( + repr(r) == "" + ) + else: + assert ( + repr(r) == "" + ) # unknown exit code: just the number r = pytester_mod.RunResult(99, outlines, errlines, duration=0.5)