MCPcopy Index your code
hub / github.com/diffgram/diffgram / pytest_configure

Function pytest_configure

default/tests/conftest.py:25–38  ·  view source on GitHub ↗
(config)

Source from the content-addressed store, hash-verified

23
24
25def pytest_configure(config):
26 engine = create_engine(settings.UNIT_TESTING_DATABASE_URL)
27 print(f"Checking DB: {settings.UNIT_TESTING_DATABASE_URL}")
28 if not database_exists(engine.url):
29 print(f"Creating DB: {settings.UNIT_TESTING_DATABASE_URL}")
30 create_database(engine.url)
31 alembic_args = [
32 '--raiseerr',
33 'upgrade',
34 'head',
35 ]
36 alembic.config.main(argv = alembic_args)
37 print('Database created successfully.')
38 engine.dispose()
39
40
41def pytest_unconfigure(config):

Callers

nothing calls this directly

Calls 1

mainMethod · 0.45

Tested by

no test coverage detected