MCPcopy
hub / github.com/sqlalchemy/sqlalchemy / _assert_stmts

Method _assert_stmts

test/engine/test_deprecations.py:368–381  ·  view source on GitHub ↗
(self, expected, received)

Source from the content-addressed store, hash-verified

366 Engine._has_events = False
367
368 def _assert_stmts(self, expected, received):
369 list(received)
370 for stmt, params, posn in expected:
371 if not received:
372 assert False, "Nothing available for stmt: %s" % stmt
373 while received:
374 teststmt, testparams, testmultiparams = received.pop(0)
375 teststmt = (
376 re.compile(r"[\n\t ]+", re.M).sub(" ", teststmt).strip()
377 )
378 if teststmt.startswith(stmt) and (
379 testparams == params or testparams == posn
380 ):
381 break
382
383 def test_engine_connect(self, testing_engine):
384 e1 = testing_engine(config.db_url)

Callers

nothing calls this directly

Calls 5

stripMethod · 0.80
subMethod · 0.80
popMethod · 0.45
compileMethod · 0.45
startswithMethod · 0.45

Tested by

no test coverage detected