← baseline_full_v2

rich_3472

failed NO_PATCH NO_PATCH UNSUBMITTED empty_patch(None) · None tool calls · 0 s · Textualize/rich

Task input

fix for missing field in dataclass

Fixes https://github.com/Textualize/rich/issues/3417

Tool calls (0)

#ToolArgumentsResult
No trace captured.

Test output

show
............................................sF
=================================== FAILURES ===================================
____________________________ test_attrs_broken_310 _____________________________

    @skip_py37
    @skip_py38
    @skip_py39
    def test_attrs_broken_310() -> None:
        @attr.define
        class Foo:
            bar: int
    
        foo = Foo(1)
        del foo.bar
        result = pretty_repr(foo)
        print(repr(result))
        expected = "Foo(bar=AttributeError(\"'Foo' object has no attribute 'bar'\"))"
>       assert result == expected
E       assert 'Foo(\n    ba... \'bar\'")\n)' == 'Foo(bar=Attr...te \'bar\'"))'
E         
E         - Foo(bar=AttributeError("'Foo' object has no attribute 'bar'"))
E         + Foo(
E         +     bar=AttributeError("'tests.test_pretty.test_attrs_broken_310.<locals>.Foo' object has no attribute 'bar'")
E         + )

tests/test_pretty.py:672: AssertionError
----------------------------- Captured stdout call -----------------------------
'Foo(\n    bar=AttributeError("\'tests.test_pretty.test_attrs_broken_310.<locals>.Foo\' object has no attribute \'bar\'")\n)'
!!!!!!!!!!!!!!!!!!!!!!!!!! stopping after 1 failures !!!!!!!!!!!!!!!!!!!!!!!!!!!
1 failed, 44 passed, 1 skipped in 0.17s