MCPcopy
hub / github.com/sqlalchemy/sqlalchemy / test_scalar_optional

Method test_scalar_optional

test/sql/test_sequences.py:173–178  ·  view source on GitHub ↗

test dialect executes a Sequence, returns nextval, whether or not "optional" is set

(self, connection)

Source from the content-addressed store, hash-verified

171 self._assert_seq_result(connection.execute(s))
172
173 def test_scalar_optional(self, connection):
174 """test dialect executes a Sequence, returns nextval, whether
175 or not "optional" is set"""
176
177 s = normalize_sequence(config, Sequence("my_sequence", optional=True))
178 self._assert_seq_result(connection.scalar(s))
179
180 def test_execute_next_value(self, connection):
181 """test func.next_value().execute()/.scalar() works

Callers

nothing calls this directly

Calls 4

_assert_seq_resultMethod · 0.95
normalize_sequenceFunction · 0.90
SequenceClass · 0.90
scalarMethod · 0.45

Tested by

no test coverage detected