add typing for tests
This commit is contained in:
parent
15bf399a89
commit
14d19ce9dd
5 changed files with 19 additions and 17 deletions
|
|
@ -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"))
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue