Skip to content

Commit c8abbb3

Browse files
committed
Fix test for Python 3.13
1 parent 815596e commit c8abbb3

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

tests/test_pretty.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -668,7 +668,10 @@ class Foo:
668668
del foo.bar
669669
result = pretty_repr(foo)
670670
print(repr(result))
671-
expected = "Foo(bar=AttributeError(\"'Foo' object has no attribute 'bar'\"))"
671+
if sys.version_info >= (3, 13):
672+
expected = "Foo(\n bar=AttributeError(\"'tests.test_pretty.test_attrs_broken_310.<locals>.Foo' object has no attribute 'bar'\")\n)"
673+
else:
674+
expected = "Foo(bar=AttributeError(\"'Foo' object has no attribute 'bar'\"))"
672675
assert result == expected
673676

674677

0 commit comments

Comments
 (0)