MCPcopy
hub / github.com/sqlalchemy/sqlalchemy / test_exec_options

Method test_exec_options

test/sql/test_functions.py:1431–1442  ·  view source on GitHub ↗
(self, connection)

Source from the content-addressed store, hash-verified

1429 assert (x == y == z == q) is True
1430
1431 def test_exec_options(self, connection):
1432 f = func.foo()
1433 eq_(f._execution_options, {})
1434
1435 f = f.execution_options(foo="bar")
1436 eq_(f._execution_options, {"foo": "bar"})
1437 s = f.select()
1438 eq_(s._execution_options, {"foo": "bar"})
1439
1440 ret = connection.execute(func.now().execution_options(foo="bar"))
1441 eq_(ret.context.execution_options, {"foo": "bar"})
1442 ret.close()
1443
1444 @testing.provide_metadata
1445 def test_update(self, connection):

Callers

nothing calls this directly

Calls 7

eq_Function · 0.90
nowMethod · 0.80
fooMethod · 0.45
execution_optionsMethod · 0.45
selectMethod · 0.45
executeMethod · 0.45
closeMethod · 0.45

Tested by

no test coverage detected