(app: Flask, model_class: t.Any)
| 90 | |
| 91 | @pytest.mark.usefixtures("app_ctx") |
| 92 | def test_sqlite_relative_path(app: Flask, model_class: t.Any) -> None: |
| 93 | app.config["SQLALCHEMY_DATABASE_URI"] = "sqlite:///test.db" |
| 94 | db = SQLAlchemy(app, model_class=model_class) |
| 95 | db.create_all() |
| 96 | assert not isinstance(db.engine.pool, sa.pool.StaticPool) |
| 97 | db_path = db.engine.url.database |
| 98 | assert db_path.startswith(app.instance_path) # type: ignore[union-attr] |
| 99 | assert os.path.exists(db_path) # type: ignore[arg-type] |
| 100 | |
| 101 | |
| 102 | @pytest.mark.usefixtures("app_ctx") |
nothing calls this directly
no test coverage detected
searching dependent graphs…