| 900 | my_box["a-b"] = 3 |
| 901 | |
| 902 | def test_copy(self): |
| 903 | my_box = Box(movie_data, camel_killer_box=True) |
| 904 | bb = my_box.copy() |
| 905 | assert my_box == bb |
| 906 | assert isinstance(bb, Box) |
| 907 | assert bb._box_config["camel_killer_box"] |
| 908 | |
| 909 | aa = copy.deepcopy(my_box) |
| 910 | assert my_box == aa |
| 911 | assert isinstance(aa, Box) |
| 912 | |
| 913 | cc = my_box.__copy__() |
| 914 | assert my_box == cc |
| 915 | assert isinstance(cc, Box) |
| 916 | assert cc._box_config["camel_killer_box"] |
| 917 | |
| 918 | dd = BoxList([my_box]) |
| 919 | assert dd == copy.copy(dd) |
| 920 | assert isinstance(copy.copy(dd), BoxList) |
| 921 | |
| 922 | def test_custom_key_errors(self): |
| 923 | my_box = Box() |