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

Method test_expand_update_bulk

test/ext/test_hybrid.py:1786–1802  ·  view source on GitHub ↗
(self, crud, expand_update, decl_base)

Source from the content-addressed store, hash-verified

1784
1785 @testing.variation("crud", ["insert", "update"])
1786 def test_expand_update_bulk(self, crud, expand_update, decl_base):
1787 A = expand_update
1788 decl_base.metadata.create_all(testing.db)
1789
1790 with expect_raises_message(
1791 exc.InvalidRequestError,
1792 "Can't evaluate bulk DML statement; "
1793 "please supply a bulk_dml decorated function",
1794 ):
1795 with Session(testing.db) as session:
1796 session.execute(
1797 insert(A) if crud.insert else update(A),
1798 [
1799 {"xy": Point(3, 4)},
1800 {"xy": Point(5, 6)},
1801 ],
1802 )
1803
1804 @testing.variation("crud", ["insert", "update"])
1805 def test_expand_dml_bulk(self, crud, expand_dml, decl_base, connection):

Callers

nothing calls this directly

Calls 7

expect_raises_messageFunction · 0.90
SessionClass · 0.90
insertFunction · 0.90
updateFunction · 0.90
create_allMethod · 0.80
PointClass · 0.70
executeMethod · 0.45

Tested by

no test coverage detected