MCPcopy
hub / github.com/sqlalchemy/sqlalchemy / test_pk_col_mismatch_one

Method test_pk_col_mismatch_one

test/sql/test_metadata.py:2201–2214  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

2199 eq_(t.c.z.primary_key, False)
2200
2201 def test_pk_col_mismatch_one(self):
2202 m = MetaData()
2203
2204 with expect_warnings(
2205 "Table 't' specifies columns 'x' as primary_key=True, "
2206 "not matching locally specified columns 'q'"
2207 ):
2208 Table(
2209 "t",
2210 m,
2211 Column("x", Integer, primary_key=True),
2212 Column("q", Integer),
2213 PrimaryKeyConstraint("q"),
2214 )
2215
2216 def test_pk_col_mismatch_two(self):
2217 m = MetaData()

Callers

nothing calls this directly

Calls 5

MetaDataClass · 0.90
expect_warningsFunction · 0.90
TableClass · 0.90
ColumnClass · 0.90

Tested by

no test coverage detected