(self)
| 906 | assert "kcol2" in cc |
| 907 | |
| 908 | def test_dupes_add(self): |
| 909 | c1, c2a, c3, c2b = ( |
| 910 | column("c1"), |
| 911 | column("c2"), |
| 912 | column("c3"), |
| 913 | column("c2"), |
| 914 | ) |
| 915 | |
| 916 | cc = sql.ColumnCollection() |
| 917 | |
| 918 | cc.add(c1) |
| 919 | cc.add(c2a, "c2") |
| 920 | cc.add(c3) |
| 921 | cc.add(c2b) |
| 922 | |
| 923 | eq_(cc._all_columns, [c1, c2a, c3, c2b]) |
| 924 | |
| 925 | eq_(list(cc), [c1, c2a, c3, c2b]) |
| 926 | eq_(cc.keys(), ["c1", "c2", "c3", "c2"]) |
| 927 | |
| 928 | assert cc.contains_column(c2a) |
| 929 | assert cc.contains_column(c2b) |
| 930 | |
| 931 | # this is deterministic |
| 932 | is_(cc["c2"], c2a) |
| 933 | |
| 934 | self._assert_collection_integrity(cc) |
| 935 | |
| 936 | ci = cc.as_readonly() |
| 937 | eq_(ci._all_columns, [c1, c2a, c3, c2b]) |
| 938 | eq_(list(ci), [c1, c2a, c3, c2b]) |
| 939 | eq_(ci.keys(), ["c1", "c2", "c3", "c2"]) |
| 940 | |
| 941 | def test_dupes_construct(self): |
| 942 | c1, c2a, c3, c2b = ( |
nothing calls this directly
no test coverage detected