Skip to content

Commit 67c3c3e

Browse files
committed
it ran!
1 parent 7eadc7e commit 67c3c3e

File tree

1 file changed

+9
-2
lines changed

1 file changed

+9
-2
lines changed

tests/plugins/test_dbos_plugin.py

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
from __future__ import annotations
22

33
from typing import Generator, Any
4+
from pathlib import Path
45

56
import pytest
67

@@ -18,12 +19,18 @@
1819

1920

2021
@pytest.fixture()
21-
def dbos() -> Generator[None, Any, None]:
22+
def dbos(tmp_path: Path) -> Generator[None, Any, None]:
23+
# Use a file-based SQLite DB so the schema persists across connections/threads
24+
db_file: Path = tmp_path / "dbos_test.sqlite3"
25+
# Allow usage across threads in tests
26+
system_db_url: str = f"sqlite+pysqlite:///{db_file}?check_same_thread=false"
27+
2228
config: DBOSConfig = {
2329
"name": "workflows-py-dbostest",
24-
"system_database_url": "sqlite:///:memory:",
30+
"system_database_url": system_db_url,
2531
"run_admin_server": False,
2632
}
33+
# DBOS.reset_system_database()
2734
DBOS(config=config)
2835
DBOS.launch()
2936
try:

0 commit comments

Comments
 (0)