MCPcopy
hub / github.com/sqlalchemy/sqlalchemy / _engine_fixture

Method _engine_fixture

test/engine/test_execute.py:1123–1130  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

1121
1122class MockStrategyTest(fixtures.TestBase):
1123 def _engine_fixture(self):
1124 buf = StringIO()
1125
1126 def dump(sql, *multiparams, **params):
1127 buf.write(str(sql.compile(dialect=engine.dialect)))
1128
1129 engine = create_mock_engine("postgresql+psycopg2://", executor=dump)
1130 return engine, buf
1131
1132 def test_sequence_not_duped(self):
1133 engine, buf = self._engine_fixture()

Callers 1

Calls 1

create_mock_engineFunction · 0.90

Tested by

no test coverage detected