MCPcopy Create free account
hub / github.com/sqlalchemy/sqlalchemy / test_items

Method test_items

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

Source from the content-addressed store, hash-verified

761 eq_(ci.values(), [c1, c2, c3])
762
763 def test_items(self):
764 c1, c2, c3 = sql.column("c1"), sql.column("c2"), sql.column("c3")
765 c2.key = "foo"
766 cc = self._column_collection(
767 columns=[("c1", c1), ("foo", c2), ("c3", c3)]
768 )
769 items = cc.items()
770 eq_(items, [("c1", c1), ("foo", c2), ("c3", c3)])
771 ne_(id(items), id(cc.items()))
772
773 ci = cc.as_readonly()
774 eq_(ci.items(), [("c1", c1), ("foo", c2), ("c3", c3)])
775
776 def test_getitem_tuple_str(self):
777 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