(self)
| 1040 | assert bx.get("test", None) is None |
| 1041 | |
| 1042 | def test_inheritance_copy(self): |
| 1043 | class Box2(Box): |
| 1044 | pass |
| 1045 | |
| 1046 | class SBox2(SBox): |
| 1047 | pass |
| 1048 | |
| 1049 | class ConfigBox2(ConfigBox): |
| 1050 | pass |
| 1051 | |
| 1052 | b = Box2(a=1) |
| 1053 | c = b.copy() |
| 1054 | assert c == b |
| 1055 | assert isinstance(c, Box) |
| 1056 | c = b.__copy__() |
| 1057 | assert c == b |
| 1058 | assert isinstance(c, Box) |
| 1059 | |
| 1060 | d = SBox2(a=1) |
| 1061 | e = d.copy() |
| 1062 | assert e == d |
| 1063 | assert isinstance(e, SBox) |
| 1064 | e = d.__copy__() |
| 1065 | assert e == d |
| 1066 | assert isinstance(e, SBox) |
| 1067 | |
| 1068 | f = ConfigBox2(a=1) |
| 1069 | g = f.copy() |
| 1070 | assert g == f |
| 1071 | assert isinstance(g, ConfigBox) |
| 1072 | g = f.__copy__() |
| 1073 | assert g == f |
| 1074 | assert isinstance(g, ConfigBox) |
| 1075 | |
| 1076 | def test_inheritance(self): |
| 1077 | data = { |
nothing calls this directly
no test coverage detected