import sqlalchemy as sql

from delta_barth import databases as db


def test_get_engine(tmp_path):
    db_path = tmp_path / "test_db.db"
    engine = db.get_engine(db_path)
    assert isinstance(engine, sql.Engine)
    assert "sqlite" in str(engine.url)
    assert db_path.parent.name in str(engine.url)
