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

Method test_copy

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

Source from the content-addressed store, hash-verified

851 my_box["a-b"] = 3
852
853 def test_copy(self):
854 my_box = Box(movie_data, camel_killer_box=True)
855 bb = my_box.copy()
856 assert my_box == bb
857 assert isinstance(bb, Box)
858 assert bb._box_config["camel_killer_box"]
859
860 aa = copy.deepcopy(my_box)
861 assert my_box == aa
862 assert isinstance(aa, Box)
863
864 cc = my_box.__copy__()
865 assert my_box == cc
866 assert isinstance(cc, Box)
867 assert cc._box_config["camel_killer_box"]
868
869 dd = BoxList([my_box])
870 assert dd == copy.copy(dd)
871 assert isinstance(copy.copy(dd), BoxList)
872
873 def test_custom_key_errors(self):
874 my_box = Box()

Callers

nothing calls this directly

Calls 4

copyMethod · 0.95
__copy__Method · 0.95
BoxClass · 0.90
BoxListClass · 0.90

Tested by

no test coverage detected