(self)
| 1146 | eq_(list(ci), [c1, c2, c3]) |
| 1147 | |
| 1148 | def test_replace(self): |
| 1149 | cc = DedupeColumnCollection() |
| 1150 | ci = cc.as_readonly() |
| 1151 | |
| 1152 | c1, c2a, c3, c2b = ( |
| 1153 | column("c1"), |
| 1154 | column("c2"), |
| 1155 | column("c3"), |
| 1156 | column("c2"), |
| 1157 | ) |
| 1158 | |
| 1159 | cc.add(c1) |
| 1160 | cc.add(c2a) |
| 1161 | cc.add(c3) |
| 1162 | |
| 1163 | cc.replace(c2b) |
| 1164 | |
| 1165 | eq_(cc._all_columns, [c1, c2b, c3]) |
| 1166 | eq_(list(cc), [c1, c2b, c3]) |
| 1167 | is_(cc[1], c2b) |
| 1168 | |
| 1169 | assert not cc.contains_column(c2a) |
| 1170 | assert cc.contains_column(c2b) |
| 1171 | self._assert_collection_integrity(cc) |
| 1172 | |
| 1173 | eq_(ci._all_columns, [c1, c2b, c3]) |
| 1174 | eq_(list(ci), [c1, c2b, c3]) |
| 1175 | is_(ci[1], c2b) |
| 1176 | |
| 1177 | def test_replace_key_matches_name_of_another(self): |
| 1178 | cc = DedupeColumnCollection() |
nothing calls this directly
no test coverage detected