SIMPLE-AstroDB / SIMPLE-db

BSD 3-Clause "New" or "Revised" License
11 stars 22 forks source link

Setup `conftest.py` to consolidate tests #467

Closed kelle closed 7 months ago

kelle commented 7 months ago

Right now, every test module loads the database. This could instead be done at the beginning of the session using the conftest.py file and making a fixture:

@pytest.fixture(scope="session", autouse=True)
def db():
    db = load_astrodb(DB_NAME, recreatedb=False)
    return db

This is soon to be implemented in astrodb_scripts via https://github.com/astrodbtoolkit/astrodb_scripts/pull/26