MCPcopy
hub / github.com/sqlalchemy/sqlalchemy / test_empty_insert_pk3

Method test_empty_insert_pk3

test/dialect/sqlite/test_dialect.py:629–646  ·  view source on GitHub ↗
(self, connection)

Source from the content-addressed store, hash-verified

627 )
628
629 def test_empty_insert_pk3(self, connection):
630 # now warns due to [ticket:3216]
631 with expect_warnings(
632 "Column 'c.x' is marked as a member of the primary key for table"
633 ):
634 assert_raises(
635 exc.IntegrityError,
636 self._test_empty_insert,
637 connection,
638 Table(
639 "c",
640 MetaData(),
641 Column("x", Integer, primary_key=True),
642 Column(
643 "y", Integer, DefaultClause("123"), primary_key=True
644 ),
645 ),
646 )
647
648 def test_empty_insert_pk3_fv(self, connection):
649 assert_raises(

Callers

nothing calls this directly

Calls 6

expect_warningsFunction · 0.90
assert_raisesFunction · 0.90
TableClass · 0.90
MetaDataClass · 0.90
ColumnClass · 0.90
DefaultClauseClass · 0.90

Tested by

no test coverage detected