MCPcopy
hub / github.com/sqlalchemy/alembic / test_delete_multi_match

Method test_delete_multi_match

tests/test_version_table.py:351–367  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

349 self.updater.update_to_step(_down("x", None, True))
350
351 def test_delete_multi_match(self):
352 with self.connection.begin():
353 self.connection.execute(
354 version_table.insert(), dict(version_num="a")
355 )
356 self.connection.execute(
357 version_table.insert(), dict(version_num="a")
358 )
359
360 self.updater.heads.add("a")
361 assert_raises_message(
362 CommandError,
363 "Online migration expected to match one row when "
364 "deleting 'a' in 'version_table'; 2 found",
365 self.updater.update_to_step,
366 _down("a", None, True),
367 )
368
369 def test_delete_multi_match_no_sane_rowcount(self):
370 with self.connection.begin():

Callers

nothing calls this directly

Calls 3

assert_raises_messageFunction · 0.90
_downFunction · 0.85
executeMethod · 0.45

Tested by

no test coverage detected