MCPcopy Create free account
hub / github.com/cdgriffith/Box / test_delete_attributes

Method test_delete_attributes

test/test_box.py:1247–1262  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

1245 assert not isinstance(bx.a, Box)
1246
1247 def test_delete_attributes(self):
1248 b = Box(notThief=1, sortaThief=0, reallyAThief=True, camel_killer_box=True)
1249 b["$OhNo!"] = 3
1250 c = Box(notThief=1, sortaThief=0, reallyAThief=True, camel_killer_box=True, conversion_box=False)
1251 del b.not_thief
1252 del b._oh_no_
1253 del b.really_a_thief
1254 with pytest.raises(KeyError):
1255 del b.really_a_thief
1256 with pytest.raises(KeyError):
1257 del b._oh_no_
1258
1259 del c.not_thief
1260 del c.really_a_thief
1261 with pytest.raises(KeyError):
1262 del c.really_a_thief
1263
1264 def test_add_boxes(self):
1265 b = Box(c=1, d={"sub": 1}, e=1)

Callers

nothing calls this directly

Calls 1

BoxClass · 0.90

Tested by

no test coverage detected