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

Method test_custom_key_errors

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

Source from the content-addressed store, hash-verified

871 assert isinstance(copy.copy(dd), BoxList)
872
873 def test_custom_key_errors(self):
874 my_box = Box()
875
876 with pytest.raises(BoxKeyError):
877 my_box.g
878
879 with pytest.raises(AttributeError):
880 my_box.g
881
882 with pytest.raises(KeyError):
883 my_box["g"]
884
885 with pytest.raises(BoxKeyError):
886 my_box["g"]
887
888 with pytest.raises(BoxError):
889 my_box["g"]
890
891 def test_pickle(self):
892 if platform.python_implementation() == "PyPy":

Callers

nothing calls this directly

Calls 1

BoxClass · 0.90

Tested by

no test coverage detected