use pathlib.Path for directories and files
Some checks failed
Ruff / ruff (push) Waiting to run
Pytest / pytest (3.12) (push) Successful in 1m15s
Pytest / pytest (3.13) (push) Has been cancelled
Mypy / mypy (push) Successful in 1m13s
Pytest / pytest (3.14) (push) Has been cancelled

This commit is contained in:
Justus Kuhlmann 2026-03-23 16:15:55 +01:00
commit 8162758cec
Signed by: jkuhl
GPG key ID: 00ED992DD79B85A6
13 changed files with 137 additions and 125 deletions

View file

@ -5,21 +5,21 @@ from pathlib import Path
def test_init_folders(tmp_path: Path) -> None:
dataset_path = tmp_path / "test_dataset"
init.create(str(dataset_path))
init.create(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: Path) -> None:
dataset_path = tmp_path / "test_dataset"
init.create(str(dataset_path), tracker="None")
init.create(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: Path) -> None:
dataset_path = tmp_path / "test_dataset"
init.create(str(dataset_path), tracker="None")
init.create(dataset_path, tracker="None")
config_path = dataset_path / ".corrlib"
assert os.path.exists(str(config_path))
from configparser import ConfigParser
@ -37,7 +37,7 @@ def test_init_config(tmp_path: Path) -> None:
def test_init_db(tmp_path: Path) -> None:
dataset_path = tmp_path / "test_dataset"
init.create(str(dataset_path))
init.create(dataset_path)
assert os.path.exists(str(dataset_path / "backlogger.db"))
conn = sql.connect(str(dataset_path / "backlogger.db"))
cursor = conn.cursor()