Debian Codegraph @

debian/patches/py315.patch

raw
1 Description: Fix tests for Python 3.15
2 ---
3 tests/test_inspect.py | 10 ++++++++++
4 tests/test_pretty.py | 5 +++++
5 2 files changed, 15 insertions(+)
6
7 diff --git a/tests/test_inspect.py b/tests/test_inspect.py
8 index d6972fb5..7abca37d 100644
9 --- a/tests/test_inspect.py
10 +++ b/tests/test_inspect.py
11 @@ -48,6 +48,11 @@ skip_py314 = pytest.mark.skipif(
12 reason="rendered differently on py3.14",
13 )
14
15 +skip_py315 = pytest.mark.skipif(
16 + sys.version_info.minor == 15 and sys.version_info.major == 3,
17 + reason="rendered differently on py3.15",
18 +)
19 +
20
21 skip_pypy3 = pytest.mark.skipif(
22 hasattr(sys, "pypy_version_info"),
23 @@ -145,6 +150,7 @@ def test_inspect_empty_dict():
24 assert render({}).startswith(expected)
25
26
27 +@skip_py315
28 @skip_py314
29 @skip_py313
30 @skip_py312
31 @@ -169,6 +175,7 @@ def test_inspect_builtin_function_except_python311():
32 @pytest.mark.skipif(
33 sys.version_info < (3, 11), reason="print builtin signature only available on 3.11+"
34 )
35 +@skip_py315
36 @skip_pypy3
37 def test_inspect_builtin_function_only_python311():
38 # On 3.11, the print builtin *does* have a signature, unlike in prior versions
39 @@ -227,6 +234,7 @@ def test_inspect_integer_with_value():
40 @skip_py312
41 @skip_py313
42 @skip_py314
43 +@skip_py315
44 def test_inspect_integer_with_methods_python38_and_python39():
45 expected = (
46 "╭──────────────── <class 'int'> ─────────────────╮\n"
47 @@ -266,6 +274,7 @@ def test_inspect_integer_with_methods_python38_and_python39():
48 @skip_py312
49 @skip_py313
50 @skip_py314
51 +@skip_py315
52 def test_inspect_integer_with_methods_python310only():
53 expected = (
54 "╭──────────────── <class 'int'> ─────────────────╮\n"
55 @@ -309,6 +318,7 @@ def test_inspect_integer_with_methods_python310only():
56 @skip_py312
57 @skip_py313
58 @skip_py314
59 +@skip_py315
60 def test_inspect_integer_with_methods_python311():
61 # to_bytes and from_bytes methods on int had minor signature change -
62 # they now, as of 3.11, have default values for all of their parameters
63 diff --git a/tests/test_pretty.py b/tests/test_pretty.py
64 index 29331d9d..a63f848b 100644
65 --- a/tests/test_pretty.py
66 +++ b/tests/test_pretty.py
67 @@ -42,6 +42,10 @@ skip_py314 = pytest.mark.skipif(
68 sys.version_info.minor == 14 and sys.version_info.major == 3,
69 reason="rendered differently on py3.14",
70 )
71 +skip_py315 = pytest.mark.skipif(
72 + sys.version_info.minor == 15 and sys.version_info.major == 3,
73 + reason="rendered differently on py3.15",
74 +)
75
76
77 def test_install() -> None:
78 @@ -644,6 +648,7 @@ def test_attrs_empty() -> None:
79 @skip_py312
80 @skip_py313
81 @skip_py314
82 +@skip_py315
83 def test_attrs_broken() -> None:
84 @attr.define
85 class Foo: