refactor(tests): Add strict type hints to second batch of test files
This commit is contained in:
@@ -1,15 +1,15 @@
|
||||
import pytest
|
||||
from typing import Any
|
||||
import json
|
||||
from pathlib import Path
|
||||
from project_manager import get_all_tracks, save_track_state
|
||||
from models import TrackState, Metadata, Ticket
|
||||
from datetime import datetime
|
||||
|
||||
def test_get_all_tracks_empty(tmp_path):
|
||||
# conductor/tracks directory doesn't exist
|
||||
def test_get_all_tracks_empty(tmp_path: Any) -> None:
|
||||
assert get_all_tracks(tmp_path) == []
|
||||
|
||||
def test_get_all_tracks_with_state(tmp_path):
|
||||
def test_get_all_tracks_with_state(tmp_path: Any) -> None:
|
||||
tracks_dir = tmp_path / "conductor" / "tracks"
|
||||
tracks_dir.mkdir(parents=True)
|
||||
track_id = "test_track_1"
|
||||
@@ -34,7 +34,7 @@ def test_get_all_tracks_with_state(tmp_path):
|
||||
assert track["total"] == 2
|
||||
assert track["progress"] == 0.5
|
||||
|
||||
def test_get_all_tracks_with_metadata_json(tmp_path):
|
||||
def test_get_all_tracks_with_metadata_json(tmp_path: Any) -> None:
|
||||
tracks_dir = tmp_path / "conductor" / "tracks"
|
||||
tracks_dir.mkdir(parents=True)
|
||||
track_id = "test_track_2"
|
||||
@@ -66,7 +66,7 @@ def test_get_all_tracks_with_metadata_json(tmp_path):
|
||||
assert track["total"] == 3
|
||||
assert pytest.approx(track["progress"]) == 0.333333
|
||||
|
||||
def test_get_all_tracks_malformed(tmp_path):
|
||||
def test_get_all_tracks_malformed(tmp_path: Any) -> None:
|
||||
tracks_dir = tmp_path / "conductor" / "tracks"
|
||||
tracks_dir.mkdir(parents=True)
|
||||
track_id = "malformed_track"
|
||||
|
||||
Reference in New Issue
Block a user