From dab1f3b20646ccb4f944f402099e02ea1058b7b6 Mon Sep 17 00:00:00 2001 From: Dominic Davis-Foster Date: Mon, 17 Jun 2024 15:12:28 +0100 Subject: [PATCH] Update test_printt for Python 3.13 --- tests/test_utils.py | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/tests/test_utils.py b/tests/test_utils.py index 7ef7c8c3..768bd836 100644 --- a/tests/test_utils.py +++ b/tests/test_utils.py @@ -124,11 +124,17 @@ def test_printr(obj, expects, capsys): assert re.match(expects, stdout[0]) +if sys.version_info >= (3, 13): + pure_posix_path_expected = "" +else: + pure_posix_path_expected = "" + + @pytest.mark.parametrize( "obj, expects", [ ("This is a test", ""), - (pathlib.PurePosixPath("foo.txt"), ""), + (pathlib.PurePosixPath("foo.txt"), pure_posix_path_expected), (1234, ""), (12.34, ""), (CustomRepr(), ""),