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

Method test_custom_key_errors

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

Source from the content-addressed store, hash-verified

920 assert isinstance(copy.copy(dd), BoxList)
921
922 def test_custom_key_errors(self):
923 my_box = Box()
924
925 with pytest.raises(BoxKeyError):
926 my_box.g
927
928 with pytest.raises(AttributeError):
929 my_box.g
930
931 with pytest.raises(KeyError):
932 my_box["g"]
933
934 with pytest.raises(BoxKeyError):
935 my_box["g"]
936
937 with pytest.raises(BoxError):
938 my_box["g"]
939
940 def test_pickle(self):
941 if platform.python_implementation() == "PyPy":

Callers

nothing calls this directly

Calls 1

BoxClass · 0.90

Tested by

no test coverage detected