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

Method test_exec_options

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

Source from the content-addressed store, hash-verified

1162 assert (x == y == z == q) is True
1163
1164 def test_exec_options(self, connection):
1165 f = func.foo()
1166 eq_(f._execution_options, {})
1167
1168 f = f.execution_options(foo="bar")
1169 eq_(f._execution_options, {"foo": "bar"})
1170 s = f.select()
1171 eq_(s._execution_options, {"foo": "bar"})
1172
1173 ret = connection.execute(func.now().execution_options(foo="bar"))
1174 eq_(ret.context.execution_options, {"foo": "bar"})
1175 ret.close()
1176
1177 @testing.provide_metadata
1178 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