MCPcopy Create free account
hub / github.com/sqlalchemy/sqlalchemy / test_readonly_properties

Method test_readonly_properties

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

Source from the content-addressed store, hash-verified

521 m()
522
523 def test_readonly_properties(self):
524 d = util.ReadOnlyProperties({3: 4})
525 calls = (
526 lambda: d.__delitem__(1),
527 lambda: d.__setitem__(2, 3),
528 lambda: d.__setattr__(2, 3),
529 )
530 for m in calls:
531 with expect_raises_message(TypeError, "object is immutable"):
532 m()
533
534
535class 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