Skip to content

Commit

Permalink
Add detach for TypeView setitem tests
Browse files Browse the repository at this point in the history
  • Loading branch information
ionite34 committed Feb 7, 2023
1 parent 0a37df3 commit 449bbba
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions tests/views/test_view_type.py
Original file line number Diff line number Diff line change
Expand Up @@ -96,3 +96,14 @@ def test_setitem():
# Check that it works
# noinspection PyUnresolvedReferences
assert dict()._abc_123() == "test"

with v.as_mutable():
# Remove the attribute
delattr(dict, "_abc_123")

with pytest.raises(AttributeError):
_ = v["_abc_123"]

with pytest.raises(AttributeError):
# noinspection PyUnresolvedReferences
_ = dict()._abc_123

0 comments on commit 449bbba

Please sign in to comment.