From 91bbeac3ec8b87790865be974260d44adc8def61 Mon Sep 17 00:00:00 2001 From: Karolina Surma Date: Tue, 28 Jan 2025 10:03:26 +0100 Subject: [PATCH] Skip tests which are expected to fail with Python 3.14 --- tests/test_inspect.py | 9 +++++++++ tests/test_pretty.py | 5 +++++ 2 files changed, 14 insertions(+) diff --git a/tests/test_inspect.py b/tests/test_inspect.py index 130e8df12..fd1d26e2c 100644 --- a/tests/test_inspect.py +++ b/tests/test_inspect.py @@ -43,6 +43,11 @@ reason="rendered differently on py3.13", ) +skip_py314 = pytest.mark.skipif( + sys.version_info.minor == 14 and sys.version_info.major == 3, + reason="rendered differently on py3.14", +) + skip_pypy3 = pytest.mark.skipif( hasattr(sys, "pypy_version_info"), reason="rendered differently on pypy3", @@ -139,6 +144,7 @@ def test_inspect_empty_dict(): assert render({}).startswith(expected) +@skip_py314 @skip_py313 @skip_py312 @skip_py311 @@ -219,6 +225,7 @@ def test_inspect_integer_with_value(): @skip_py311 @skip_py312 @skip_py313 +@skip_py314 def test_inspect_integer_with_methods_python38_and_python39(): expected = ( "╭──────────────── ─────────────────╮\n" @@ -257,6 +264,7 @@ def test_inspect_integer_with_methods_python38_and_python39(): @skip_py311 @skip_py312 @skip_py313 +@skip_py314 def test_inspect_integer_with_methods_python310only(): expected = ( "╭──────────────── ─────────────────╮\n" @@ -299,6 +307,7 @@ def test_inspect_integer_with_methods_python310only(): @skip_py310 @skip_py312 @skip_py313 +@skip_py314 def test_inspect_integer_with_methods_python311(): # to_bytes and from_bytes methods on int had minor signature change - # they now, as of 3.11, have default values for all of their parameters diff --git a/tests/test_pretty.py b/tests/test_pretty.py index 90be42f87..29331d9d5 100644 --- a/tests/test_pretty.py +++ b/tests/test_pretty.py @@ -38,6 +38,10 @@ sys.version_info.minor == 13 and sys.version_info.major == 3, reason="rendered differently on py3.13", ) +skip_py314 = pytest.mark.skipif( + sys.version_info.minor == 14 and sys.version_info.major == 3, + reason="rendered differently on py3.14", +) def test_install() -> None: @@ -639,6 +643,7 @@ class Nada: @skip_py311 @skip_py312 @skip_py313 +@skip_py314 def test_attrs_broken() -> None: @attr.define class Foo: