From be903b49006e9fcdcb2d5e73431762411b94df86 Mon Sep 17 00:00:00 2001 From: Daniel Schadt Date: Mon, 29 Dec 2025 18:24:44 +0100 Subject: ensure tracks/users folders exist Since we don't use parents=True anymore to create the folders (which I think is good), we now need to ensure that those exist. So 1. when fietsboek starts up, we create those folders, and 2. when we delete them in the tests, we recreate them. --- tests/conftest.py | 2 ++ 1 file changed, 2 insertions(+) (limited to 'tests') diff --git a/tests/conftest.py b/tests/conftest.py index b49dad2..732c8d2 100644 --- a/tests/conftest.py +++ b/tests/conftest.py @@ -76,8 +76,10 @@ def _cleanup_data(app_settings): data_dir = Path(app_settings["fietsboek.data_dir"]) if (data_dir / "tracks").is_dir(): shutil.rmtree(data_dir / "tracks") + (data_dir / "tracks").mkdir() if (data_dir / "users").is_dir(): shutil.rmtree(data_dir / "users") + (data_dir / "users").mkdir() @pytest.fixture(scope='module') def app(app_settings, dbengine, tmp_path_factory): -- cgit v1.2.3