refactor(tests): Add strict type hints to third batch of test files
This commit is contained in:
@@ -1,5 +1,6 @@
|
||||
import pytest
|
||||
import os
|
||||
from pathlib import Path
|
||||
from unittest.mock import patch, MagicMock
|
||||
from scripts.mma_exec import create_parser, get_role_documents, execute_agent, get_model_for_role, get_dependencies
|
||||
|
||||
@@ -80,7 +81,7 @@ def test_execute_agent() -> None:
|
||||
assert kwargs.get("text") is True
|
||||
assert result == mock_stdout
|
||||
|
||||
def test_get_dependencies(tmp_path):
|
||||
def test_get_dependencies(tmp_path: Path) -> None:
|
||||
content = (
|
||||
"import os\n"
|
||||
"import sys\n"
|
||||
@@ -94,7 +95,7 @@ def test_get_dependencies(tmp_path):
|
||||
|
||||
import re
|
||||
|
||||
def test_execute_agent_logging(tmp_path):
|
||||
def test_execute_agent_logging(tmp_path: Path) -> None:
|
||||
log_file = tmp_path / "mma_delegation.log"
|
||||
# mma_exec now uses logs/agents/ for individual logs and logs/mma_delegation.log for master
|
||||
# We will patch LOG_FILE to point to our temp location
|
||||
@@ -113,7 +114,7 @@ def test_execute_agent_logging(tmp_path):
|
||||
assert test_prompt in log_content # Master log should now have the summary prompt
|
||||
assert re.search(r"\d{4}-\d{2}-\d{2}", log_content)
|
||||
|
||||
def test_execute_agent_tier3_injection(tmp_path):
|
||||
def test_execute_agent_tier3_injection(tmp_path: Path) -> None:
|
||||
main_content = "import dependency\n\ndef run():\n dependency.do_work()\n"
|
||||
main_file = tmp_path / "main.py"
|
||||
main_file.write_text(main_content)
|
||||
|
||||
Reference in New Issue
Block a user