MCPcopy
hub / github.com/sqlalchemy/sqlalchemy / test_in

Method test_in

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

Source from the content-addressed store, hash-verified

925 cc.contains_column("foo")
926
927 def test_in(self):
928 col1 = sql.column("col1")
929 cc = self._column_collection(
930 columns=[
931 ("col1", col1),
932 ("col2", sql.column("col2")),
933 ("col3", sql.column("col3")),
934 ]
935 )
936 assert "col1" in cc
937 assert "col2" in cc
938
939 assert_raises_message(
940 exc.ArgumentError,
941 "__contains__ requires a string argument",
942 lambda: col1 in cc,
943 )
944
945 def test_compare(self):
946 c1 = sql.column("col1")

Callers

nothing calls this directly

Calls 3

assert_raises_messageFunction · 0.90
columnMethod · 0.45
_column_collectionMethod · 0.45

Tested by

no test coverage detected