MCPcopy
hub / github.com/sqlalchemy/sqlalchemy / test_pk_col_mismatch_two

Method test_pk_col_mismatch_two

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

Source from the content-addressed store, hash-verified

2214 )
2215
2216 def test_pk_col_mismatch_two(self):
2217 m = MetaData()
2218
2219 with expect_warnings(
2220 "Table 't' specifies columns 'a', 'b', 'c' as primary_key=True, "
2221 "not matching locally specified columns 'b', 'c'"
2222 ):
2223 Table(
2224 "t",
2225 m,
2226 Column("a", Integer, primary_key=True),
2227 Column("b", Integer, primary_key=True),
2228 Column("c", Integer, primary_key=True),
2229 PrimaryKeyConstraint("b", "c"),
2230 )
2231
2232 @testing.emits_warning("Table 't'")
2233 def test_pk_col_mismatch_three(self):

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