MCPcopy Create free account
hub / github.com/drgrib/dotmap / test

Method test

dotmap/test.py:168–184  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

166
167class TestDynamic(unittest.TestCase):
168 def test(self):
169 m = DotMap()
170 m.still.works
171 m.sub.still.works
172 nonDynamic = DotMap(_dynamic=False)
173
174 def assignNonDynamic():
175 nonDynamic.no
176 self.assertRaises(KeyError, assignNonDynamic)
177
178 nonDynamicWithInit = DotMap(m, _dynamic=False)
179 nonDynamicWithInit.still.works
180 nonDynamicWithInit.sub.still.works
181
182 def assignNonDynamicWithInit():
183 nonDynamicWithInit.no.creation
184 self.assertRaises(KeyError, assignNonDynamicWithInit)
185
186
187class TestRecursive(unittest.TestCase):

Callers

nothing calls this directly

Calls 1

DotMapClass · 0.90

Tested by

no test coverage detected