MCPcopy Create free account
hub / github.com/LabPy/lantz / test_readonly

Method test_readonly

lantz/testsuite/test_feat.py:49–60  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

47 )
48
49 def test_readonly(self):
50
51 class Spam(Driver):
52
53 @Feat
54 def eggs(self_):
55 return 3
56
57 obj = Spam()
58 self.assertEqual(obj.eggs, 3)
59 self.assertRaises(AttributeError, setattr, obj, "eggs", 3)
60 self.assertRaises(AttributeError, delattr, obj, "eggs")
61
62 def test_writeonly(self):
63

Callers

nothing calls this directly

Calls 1

SpamClass · 0.70

Tested by

no test coverage detected