Skip to content

Commit 66162b0

Browse files
committed
test
1 parent 900689b commit 66162b0

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

src/tests/conftest.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,8 @@ def configure_test_environment() -> Generator[None, None, None]:
2424

2525
# Clean up any existing test data
2626
shutil.rmtree("./data", ignore_errors=True)
27-
shutil.copytree(test_data_path, f"./data/{TEST_ID}/", dirs_exist_ok=True)
27+
if test_data_path.exists():
28+
shutil.copytree(test_data_path, f"./data/{TEST_ID}/", dirs_exist_ok=True)
2829

2930
# Configure app for testing
3031
app.config["TESTING"] = True
@@ -39,7 +40,7 @@ def configure_test_environment() -> Generator[None, None, None]:
3940
print("Current working directory:", os.getcwd())
4041
print("Directory contents:", os.listdir("."))
4142

42-
init_database(db_path)
43+
init_database(app, db_path)
4344
os.environ["TEST_DB_PATH"] = str(db_path)
4445

4546
yield

0 commit comments

Comments
 (0)