Skip to content

armgit / strix

Public Imported from GitHub
0

Open-source AI penetration testing tool to find and fix your app’s vulnerabilities.

refactor(tests): reorganize unit tests module structure

Ahmed Allam35dd9d0a8f67
diff --git a/pyproject.toml b/pyproject.toml
index d9d65730..95d971e5 100644
--- a/pyproject.toml
+++ b/pyproject.toml
@@ -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"]
diff --git a/tests/agents/__init__.py b/tests/agents/__init__.py
new file mode 100644
index 00000000..0be0f17c
--- /dev/null
+++ b/tests/agents/__init__.py
@@ -0,0 +1 @@
+"""Tests for strix.agents module."""
diff --git a/tests/conftest.py b/tests/conftest.py
index 026daf10..e698403a 100644
--- a/tests/conftest.py
+++ b/tests/conftest.py
@@ -1,34 +1 @@
"""Pytest configuration and shared fixtures for Strix tests."""
-
-from collections.abc import Callable
-from typing import Any
-
-import pytest
-
-
-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
-
-
-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
diff --git a/tests/interface/__init__.py b/tests/interface/__init__.py
new file mode 100644
index 00000000..9261c15d
--- /dev/null
+++ b/tests/interface/__init__.py
@@ -0,0 +1 @@
+"""Tests for strix.interface module."""
diff --git a/tests/llm/__init__.py b/tests/llm/__init__.py
new file mode 100644
index 00000000..86f5ed8b
--- /dev/null
+++ b/tests/llm/__init__.py
@@ -0,0 +1 @@
+"""Tests for strix.llm module."""
diff --git a/tests/runtime/__init__.py b/tests/runtime/__init__.py
new file mode 100644
index 00000000..684b21b9
--- /dev/null
+++ b/tests/runtime/__init__.py
@@ -0,0 +1 @@
+"""Tests for strix.runtime module."""
diff --git a/tests/telemetry/__init__.py b/tests/telemetry/__init__.py
new file mode 100644
index 00000000..8f6aa4f8
--- /dev/null
+++ b/tests/telemetry/__init__.py
@@ -0,0 +1 @@
+"""Tests for strix.telemetry module."""
diff --git a/tests/tools/__init__.py b/tests/tools/__init__.py
new file mode 100644
index 00000000..182b8f12
--- /dev/null
+++ b/tests/tools/__init__.py
@@ -0,0 +1 @@
+"""Tests for strix.tools module."""
diff --git a/tests/tools/conftest.py b/tests/tools/conftest.py
new file mode 100644
index 00000000..186c5769
--- /dev/null
+++ b/tests/tools/conftest.py
@@ -0,0 +1,34 @@
+"""Fixtures for strix.tools tests."""
+
+from collections.abc import Callable
+from typing import Any
+
+import pytest
+
+
+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
+
+
+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
diff --git a/tests/test_argument_parser.py b/tests/tools/test_argument_parser.py
similarity index 98%
rename from tests/test_argument_parser.py
rename to tests/tools/test_argument_parser.py
index 8d50b0d1..14d7e112 100644
--- a/tests/test_argument_parser.py
+++ b/tests/tools/test_argument_parser.py
@@ -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