MCPcopy
hub / github.com/sqlalchemy/sqlalchemy / test_items

Method test_items

test/base/test_utils.py:858–869  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

856 eq_(ci.values(), [c1, c2, c3])
857
858 def test_items(self):
859 c1, c2, c3 = sql.column("c1"), sql.column("c2"), sql.column("c3")
860 c2.key = "foo"
861 cc = self._column_collection(
862 columns=[("c1", c1), ("foo", c2), ("c3", c3)]
863 )
864 items = cc.items()
865 eq_(items, [("c1", c1), ("foo", c2), ("c3", c3)])
866 ne_(id(items), id(cc.items()))
867
868 ci = cc.as_readonly()
869 eq_(ci.items(), [("c1", c1), ("foo", c2), ("c3", c3)])
870
871 def test_getitem_tuple_str(self):
872 c1, c2, c3 = sql.column("c1"), sql.column("c2"), sql.column("c3")

Callers

nothing calls this directly

Calls 6

eq_Function · 0.90
ne_Function · 0.90
columnMethod · 0.45
_column_collectionMethod · 0.45
itemsMethod · 0.45
as_readonlyMethod · 0.45

Tested by

no test coverage detected