From 68bcd049ee07133269845ba9fdaa773329571dae Mon Sep 17 00:00:00 2001 From: Karolina Surma Date: Tue, 12 Dec 2023 16:42:34 +0100 Subject: [PATCH] Skip tests failing with Python 3.13 --- CONTRIBUTORS.md | 1 + tests/test_inspect.py | 9 +++++++++ tests/test_pretty.py | 5 +++++ 3 files changed, 15 insertions(+) diff --git a/CONTRIBUTORS.md b/CONTRIBUTORS.md index 22b1be0db..ee4ed6acb 100644 --- a/CONTRIBUTORS.md +++ b/CONTRIBUTORS.md @@ -60,6 +60,7 @@ The following people have contributed to the development of Rich: - [Anthony Shaw](https://github.com/tonybaloney) - [Nicolas Simonds](https://github.com/0xDEC0DE) - [Aaron Stephens](https://github.com/aaronst) +- [Karolina Surma](https://github.com/befeleme) - [Gabriele N. Tornetta](https://github.com/p403n1x87) - [Nils Vu](https://github.com/nilsvu) - [Arian Mollik Wasi](https://github.com/wasi-master) diff --git a/tests/test_inspect.py b/tests/test_inspect.py index a9d553936..4f2494433 100644 --- a/tests/test_inspect.py +++ b/tests/test_inspect.py @@ -43,6 +43,11 @@ reason="rendered differently on py3.12", ) +skip_py313 = pytest.mark.skipif( + sys.version_info.minor == 13 and sys.version_info.major == 3, + reason="rendered differently on py3.13", +) + skip_pypy3 = pytest.mark.skipif( hasattr(sys, "pypy_version_info"), reason="rendered differently on pypy3", @@ -140,6 +145,7 @@ def test_inspect_empty_dict(): assert render({}).startswith(expected) +@skip_py313 @skip_py312 @skip_py311 @skip_pypy3 @@ -219,6 +225,7 @@ def test_inspect_integer_with_value(): @skip_py310 @skip_py311 @skip_py312 +@skip_py313 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_py39 @skip_py311 @skip_py312 +@skip_py313 def test_inspect_integer_with_methods_python310only(): expected = ( "╭──────────────── ─────────────────╮\n" @@ -299,6 +307,7 @@ def test_inspect_integer_with_methods_python310only(): @skip_py39 @skip_py310 @skip_py312 +@skip_py313 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 e505ed4d6..40fae2dcb 100644 --- a/tests/test_pretty.py +++ b/tests/test_pretty.py @@ -38,6 +38,10 @@ sys.version_info.minor == 12 and sys.version_info.major == 3, reason="rendered differently on py3.12", ) +skip_py313 = pytest.mark.skipif( + sys.version_info.minor == 13 and sys.version_info.major == 3, + reason="rendered differently on py3.13", +) def test_install(): @@ -611,6 +615,7 @@ class Nada: @skip_py310 @skip_py311 @skip_py312 +@skip_py313 def test_attrs_broken(): @attr.define class Foo: