Add coverage for Item.__delitem__() (#7610)

This commit is contained in:
Adrian 2026-06-12 12:32:38 +02:00 committed by GitHub
parent a8ffdcf851
commit 7afc875081
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 12 additions and 0 deletions

View File

@ -48,6 +48,18 @@ class TestItem:
with pytest.raises(KeyError):
i["field"]
def test_delitem(self):
class TestItem(Item):
name = Field()
i = TestItem(name="John")
del i["name"]
with pytest.raises(KeyError):
i["name"]
with pytest.raises(KeyError):
del i["name"]
def test_repr(self):
class TestItem(Item):
name = Field()