(self)
| 1001 | assert "kcol2" in cc |
| 1002 | |
| 1003 | def test_dupes_add(self): |
| 1004 | c1, c2a, c3, c2b = ( |
| 1005 | column("c1"), |
| 1006 | column("c2"), |
| 1007 | column("c3"), |
| 1008 | column("c2"), |
| 1009 | ) |
| 1010 | |
| 1011 | cc = sql.WriteableColumnCollection() |
| 1012 | |
| 1013 | cc.add(c1) |
| 1014 | cc.add(c2a, "c2") |
| 1015 | cc.add(c3) |
| 1016 | cc.add(c2b) |
| 1017 | |
| 1018 | eq_(cc._all_columns, [c1, c2a, c3, c2b]) |
| 1019 | |
| 1020 | eq_(list(cc), [c1, c2a, c3, c2b]) |
| 1021 | eq_(cc.keys(), ["c1", "c2", "c3", "c2"]) |
| 1022 | |
| 1023 | assert cc.contains_column(c2a) |
| 1024 | assert cc.contains_column(c2b) |
| 1025 | |
| 1026 | # this is deterministic |
| 1027 | is_(cc["c2"], c2a) |
| 1028 | |
| 1029 | self._assert_collection_integrity(cc) |
| 1030 | |
| 1031 | ci = cc.as_readonly() |
| 1032 | eq_(ci._all_columns, [c1, c2a, c3, c2b]) |
| 1033 | eq_(list(ci), [c1, c2a, c3, c2b]) |
| 1034 | eq_(ci.keys(), ["c1", "c2", "c3", "c2"]) |
| 1035 | |
| 1036 | def test_dupes_construct(self): |
| 1037 | c1, c2a, c3, c2b = ( |
nothing calls this directly
no test coverage detected