From c8abbb3bd2632655d4dce61e7a8bffc49d981cc8 Mon Sep 17 00:00:00 2001 From: Hugo van Kemenade <1324225+hugovk@users.noreply.github.com> Date: Sun, 8 Sep 2024 14:42:31 +0300 Subject: [PATCH] Fix test for Python 3.13 --- tests/test_pretty.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/tests/test_pretty.py b/tests/test_pretty.py index 7ab4f8e79..b1a543431 100644 --- a/tests/test_pretty.py +++ b/tests/test_pretty.py @@ -668,7 +668,10 @@ class Foo: del foo.bar result = pretty_repr(foo) print(repr(result)) - expected = "Foo(bar=AttributeError(\"'Foo' object has no attribute 'bar'\"))" + if sys.version_info >= (3, 13): + expected = "Foo(\n bar=AttributeError(\"'tests.test_pretty.test_attrs_broken_310..Foo' object has no attribute 'bar'\")\n)" + else: + expected = "Foo(bar=AttributeError(\"'Foo' object has no attribute 'bar'\"))" assert result == expected