(self)
| 1241 | eq_(list(ci), [c1, c2, c3]) |
| 1242 | |
| 1243 | def test_replace(self): |
| 1244 | cc = DedupeColumnCollection() |
| 1245 | ci = cc.as_readonly() |
| 1246 | |
| 1247 | c1, c2a, c3, c2b = ( |
| 1248 | column("c1"), |
| 1249 | column("c2"), |
| 1250 | column("c3"), |
| 1251 | column("c2"), |
| 1252 | ) |
| 1253 | |
| 1254 | cc.add(c1) |
| 1255 | cc.add(c2a) |
| 1256 | cc.add(c3) |
| 1257 | |
| 1258 | cc.replace(c2b) |
| 1259 | |
| 1260 | eq_(cc._all_columns, [c1, c2b, c3]) |
| 1261 | eq_(list(cc), [c1, c2b, c3]) |
| 1262 | is_(cc[1], c2b) |
| 1263 | |
| 1264 | assert not cc.contains_column(c2a) |
| 1265 | assert cc.contains_column(c2b) |
| 1266 | self._assert_collection_integrity(cc) |
| 1267 | |
| 1268 | eq_(ci._all_columns, [c1, c2b, c3]) |
| 1269 | eq_(list(ci), [c1, c2b, c3]) |
| 1270 | is_(ci[1], c2b) |
| 1271 | |
| 1272 | def test_replace_key_matches_name_of_another(self): |
| 1273 | cc = DedupeColumnCollection() |
nothing calls this directly
no test coverage detected