MCPcopy
hub / github.com/sqlalchemy/sqlalchemy / test_readonly_properties

Method test_readonly_properties

test/base/test_utils.py:618–627  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

616 m()
617
618 def test_readonly_properties(self):
619 d = util.ReadOnlyProperties({3: 4})
620 calls = (
621 lambda: d.__delitem__(1),
622 lambda: d.__setitem__(2, 3),
623 lambda: d.__setattr__(2, 3),
624 )
625 for m in calls:
626 with expect_raises_message(TypeError, "object is immutable"):
627 m()
628
629
630class MemoizedAttrTest(fixtures.TestBase):

Callers

nothing calls this directly

Calls 4

expect_raises_messageFunction · 0.90
__delitem__Method · 0.45
__setitem__Method · 0.45
__setattr__Method · 0.45

Tested by

no test coverage detected