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

Method test_execute_deprecated

test/sql/test_sequences.py:169–177  ·  view source on GitHub ↗
(self, connection)

Source from the content-addressed store, hash-verified

167 self._assert_seq_result(connection.scalar(s))
168
169 def test_execute_deprecated(self, connection):
170 s = normalize_sequence(config, Sequence("my_sequence", optional=True))
171
172 with expect_deprecated(
173 r"Using the .execute\(\) method to invoke a "
174 r"DefaultGenerator object is deprecated; please use "
175 r"the .scalar\(\) method."
176 ):
177 self._assert_seq_result(connection.execute(s))
178
179 def test_scalar_optional(self, connection):
180 """test dialect executes a Sequence, returns nextval, whether

Callers

nothing calls this directly

Calls 5

_assert_seq_resultMethod · 0.95
normalize_sequenceFunction · 0.90
SequenceClass · 0.90
expect_deprecatedFunction · 0.90
executeMethod · 0.45

Tested by

no test coverage detected