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

Method test_nextval_unsupported

test/sql/test_sequences.py:431–442  ·  view source on GitHub ↗

test next_value() used on non-sequence platform raises NotImplementedError.

(self)

Source from the content-addressed store, hash-verified

429 return testing.db.dialect.has_sequence(connection, name)
430
431 def test_nextval_unsupported(self):
432 """test next_value() used on non-sequence platform
433 raises NotImplementedError."""
434
435 s = normalize_sequence(config, Sequence("my_seq"))
436 d = sqlite.dialect()
437 assert_raises_message(
438 NotImplementedError,
439 "Dialect 'sqlite' does not support sequence increments.",
440 s.next_value().compile,
441 dialect=d,
442 )
443
444 def test_checkfirst_sequence(self, connection):
445 s = normalize_sequence(config, Sequence("my_sequence"))

Callers

nothing calls this directly

Calls 5

normalize_sequenceFunction · 0.90
SequenceClass · 0.90
assert_raises_messageFunction · 0.90
dialectMethod · 0.45
next_valueMethod · 0.45

Tested by

no test coverage detected