use Path in type annotations

This commit is contained in:
Justus Kuhlmann 2026-03-23 13:05:33 +01:00
commit 92f307b83a
Signed by: jkuhl
GPG key ID: 00ED992DD79B85A6
4 changed files with 11 additions and 9 deletions

View file

@ -1,22 +1,23 @@
import corrlib.initialization as init
import os
import sqlite3 as sql
from pathlib import Path
def test_init_folders(tmp_path):
def test_init_folders(tmp_path: Path) -> None:
dataset_path = tmp_path / "test_dataset"
init.create(str(dataset_path))
assert os.path.exists(str(dataset_path))
assert os.path.exists(str(dataset_path / "backlogger.db"))
def test_init_folders_no_tracker(tmp_path):
def test_init_folders_no_tracker(tmp_path: Path) -> None:
dataset_path = tmp_path / "test_dataset"
init.create(str(dataset_path), tracker="None")
assert os.path.exists(str(dataset_path))
assert os.path.exists(str(dataset_path / "backlogger.db"))
def test_init_config(tmp_path):
def test_init_config(tmp_path: Path) -> None:
dataset_path = tmp_path / "test_dataset"
init.create(str(dataset_path), tracker="None")
config_path = dataset_path / ".corrlib"
@ -34,7 +35,7 @@ def test_init_config(tmp_path):
assert config.get("paths", "import_scripts_path") == "import_scripts"
def test_init_db(tmp_path):
def test_init_db(tmp_path: Path) -> None:
dataset_path = tmp_path / "test_dataset"
init.create(str(dataset_path))
assert os.path.exists(str(dataset_path / "backlogger.db"))