refactor(tests): reorganize unit tests module structure
This commit is contained in:
@@ -327,7 +327,6 @@ addopts = [
|
||||
"--cov-report=term-missing",
|
||||
"--cov-report=html",
|
||||
"--cov-report=xml",
|
||||
"--cov-fail-under=80"
|
||||
]
|
||||
testpaths = ["tests"]
|
||||
python_files = ["test_*.py", "*_test.py"]
|
||||
|
||||
1
tests/agents/__init__.py
Normal file
1
tests/agents/__init__.py
Normal file
@@ -0,0 +1 @@
|
||||
"""Tests for strix.agents module."""
|
||||
@@ -1,34 +1 @@
|
||||
"""Pytest configuration and shared fixtures for Strix tests."""
|
||||
|
||||
from collections.abc import Callable
|
||||
from typing import Any
|
||||
|
||||
import pytest
|
||||
|
||||
|
||||
@pytest.fixture
|
||||
def sample_function_with_types() -> Callable[..., None]:
|
||||
"""Create a sample function with type annotations for testing argument conversion."""
|
||||
|
||||
def func(
|
||||
name: str,
|
||||
count: int,
|
||||
enabled: bool,
|
||||
ratio: float,
|
||||
items: list[Any],
|
||||
config: dict[str, Any],
|
||||
optional: str | None = None,
|
||||
) -> None:
|
||||
pass
|
||||
|
||||
return func
|
||||
|
||||
|
||||
@pytest.fixture
|
||||
def sample_function_no_annotations() -> Callable[..., None]:
|
||||
"""Create a sample function without type annotations."""
|
||||
|
||||
def func(arg1: Any, arg2: Any, arg3: Any) -> None:
|
||||
pass
|
||||
|
||||
return func
|
||||
|
||||
1
tests/interface/__init__.py
Normal file
1
tests/interface/__init__.py
Normal file
@@ -0,0 +1 @@
|
||||
"""Tests for strix.interface module."""
|
||||
1
tests/llm/__init__.py
Normal file
1
tests/llm/__init__.py
Normal file
@@ -0,0 +1 @@
|
||||
"""Tests for strix.llm module."""
|
||||
1
tests/runtime/__init__.py
Normal file
1
tests/runtime/__init__.py
Normal file
@@ -0,0 +1 @@
|
||||
"""Tests for strix.runtime module."""
|
||||
1
tests/telemetry/__init__.py
Normal file
1
tests/telemetry/__init__.py
Normal file
@@ -0,0 +1 @@
|
||||
"""Tests for strix.telemetry module."""
|
||||
1
tests/tools/__init__.py
Normal file
1
tests/tools/__init__.py
Normal file
@@ -0,0 +1 @@
|
||||
"""Tests for strix.tools module."""
|
||||
34
tests/tools/conftest.py
Normal file
34
tests/tools/conftest.py
Normal file
@@ -0,0 +1,34 @@
|
||||
"""Fixtures for strix.tools tests."""
|
||||
|
||||
from collections.abc import Callable
|
||||
from typing import Any
|
||||
|
||||
import pytest
|
||||
|
||||
|
||||
@pytest.fixture
|
||||
def sample_function_with_types() -> Callable[..., None]:
|
||||
"""Create a sample function with type annotations for testing argument conversion."""
|
||||
|
||||
def func(
|
||||
name: str,
|
||||
count: int,
|
||||
enabled: bool,
|
||||
ratio: float,
|
||||
items: list[Any],
|
||||
config: dict[str, Any],
|
||||
optional: str | None = None,
|
||||
) -> None:
|
||||
pass
|
||||
|
||||
return func
|
||||
|
||||
|
||||
@pytest.fixture
|
||||
def sample_function_no_annotations() -> Callable[..., None]:
|
||||
"""Create a sample function without type annotations."""
|
||||
|
||||
def func(arg1, arg2, arg3): # type: ignore[no-untyped-def]
|
||||
pass
|
||||
|
||||
return func
|
||||
@@ -1,10 +1,3 @@
|
||||
"""Tests for the argument_parser module.
|
||||
|
||||
This module tests the type conversion utilities used for converting
|
||||
string arguments to their appropriate Python types based on function
|
||||
type annotations.
|
||||
"""
|
||||
|
||||
from collections.abc import Callable
|
||||
|
||||
import pytest
|
||||
Reference in New Issue
Block a user