Skip to content

Commit

Permalink
Fix test for Python 3.13
Browse files Browse the repository at this point in the history
  • Loading branch information
hugovk committed Sep 8, 2024
1 parent 815596e commit c8abbb3
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion tests/test_pretty.py
Original file line number Diff line number Diff line change
Expand Up @@ -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.<locals>.Foo' object has no attribute 'bar'\")\n)"
else:
expected = "Foo(bar=AttributeError(\"'Foo' object has no attribute 'bar'\"))"
assert result == expected


Expand Down

0 comments on commit c8abbb3

Please sign in to comment.