Description: Fix tests for Python 3.15 --- tests/test_inspect.py | 10 ++++++++++ tests/test_pretty.py | 5 +++++ 2 files changed, 15 insertions(+) diff --git a/tests/test_inspect.py b/tests/test_inspect.py index d6972fb5..7abca37d 100644 --- a/tests/test_inspect.py +++ b/tests/test_inspect.py @@ -48,6 +48,11 @@ skip_py314 = pytest.mark.skipif( reason="rendered differently on py3.14", ) +skip_py315 = pytest.mark.skipif( + sys.version_info.minor == 15 and sys.version_info.major == 3, + reason="rendered differently on py3.15", +) + skip_pypy3 = pytest.mark.skipif( hasattr(sys, "pypy_version_info"), @@ -145,6 +150,7 @@ def test_inspect_empty_dict(): assert render({}).startswith(expected) +@skip_py315 @skip_py314 @skip_py313 @skip_py312 @@ -169,6 +175,7 @@ def test_inspect_builtin_function_except_python311(): @pytest.mark.skipif( sys.version_info < (3, 11), reason="print builtin signature only available on 3.11+" ) +@skip_py315 @skip_pypy3 def test_inspect_builtin_function_only_python311(): # On 3.11, the print builtin *does* have a signature, unlike in prior versions @@ -227,6 +234,7 @@ def test_inspect_integer_with_value(): @skip_py312 @skip_py313 @skip_py314 +@skip_py315 def test_inspect_integer_with_methods_python38_and_python39(): expected = ( "╭──────────────── ─────────────────╮\n" @@ -266,6 +274,7 @@ def test_inspect_integer_with_methods_python38_and_python39(): @skip_py312 @skip_py313 @skip_py314 +@skip_py315 def test_inspect_integer_with_methods_python310only(): expected = ( "╭──────────────── ─────────────────╮\n" @@ -309,6 +318,7 @@ def test_inspect_integer_with_methods_python310only(): @skip_py312 @skip_py313 @skip_py314 +@skip_py315 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 29331d9d..a63f848b 100644 --- a/tests/test_pretty.py +++ b/tests/test_pretty.py @@ -42,6 +42,10 @@ skip_py314 = pytest.mark.skipif( sys.version_info.minor == 14 and sys.version_info.major == 3, reason="rendered differently on py3.14", ) +skip_py315 = pytest.mark.skipif( + sys.version_info.minor == 15 and sys.version_info.major == 3, + reason="rendered differently on py3.15", +) def test_install() -> None: @@ -644,6 +648,7 @@ def test_attrs_empty() -> None: @skip_py312 @skip_py313 @skip_py314 +@skip_py315 def test_attrs_broken() -> None: @attr.define class Foo: