add types

This commit is contained in:
Justus Kuhlmann 2026-03-23 13:01:58 +01:00
commit 6bb48f151c
Signed by: jkuhl
GPG key ID: 00ED992DD79B85A6

View file

@ -2,18 +2,19 @@ from typer.testing import CliRunner
from corrlib.cli import app
import os
import sqlite3 as sql
from pathlib import Path
runner = CliRunner()
def test_version():
def test_version() -> None:
result = runner.invoke(app, ["--version"])
assert result.exit_code == 0
assert "corrlib" in result.output
def test_init_folders(tmp_path):
def test_init_folders(tmp_path: Path) -> None:
dataset_path = tmp_path / "test_dataset"
result = runner.invoke(app, ["init", "--dataset", str(dataset_path)])
assert result.exit_code == 0
@ -21,7 +22,7 @@ def test_init_folders(tmp_path):
assert os.path.exists(str(dataset_path / "backlogger.db"))
def test_init_db(tmp_path):
def test_init_db(tmp_path: Path) -> None:
dataset_path = tmp_path / "test_dataset"
result = runner.invoke(app, ["init", "--dataset", str(dataset_path)])
assert result.exit_code == 0
@ -81,7 +82,7 @@ def test_init_db(tmp_path):
assert expected_col in backlog_column_names
def test_list(tmp_path):
def test_list(tmp_path: Path) -> None:
dataset_path = tmp_path / "test_dataset"
result = runner.invoke(app, ["init", "--dataset", str(dataset_path)])
assert result.exit_code == 0