MCPcopy
hub / github.com/sqlalchemy/sqlalchemy / test_nextval_unsupported

Method test_nextval_unsupported

test/sql/test_sequences.py:425–436  ·  view source on GitHub ↗

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

(self)

Source from the content-addressed store, hash-verified

423 return testing.db.dialect.has_sequence(connection, name)
424
425 def test_nextval_unsupported(self):
426 """test next_value() used on non-sequence platform
427 raises NotImplementedError."""
428
429 s = normalize_sequence(config, Sequence("my_seq"))
430 d = sqlite.dialect()
431 assert_raises_message(
432 NotImplementedError,
433 "Dialect 'sqlite' does not support sequence increments.",
434 s.next_value().compile,
435 dialect=d,
436 )
437
438 def test_checkfirst_sequence(self, connection):
439 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