Skip to content

Commit 7adbf55

Browse files
authored
Merge pull request #35 from knitli/copilot/fix-test-harness-issues
Fix test collection namespace collision and apply consistent pytest marks
2 parents 629faef + 86c8154 commit 7adbf55

28 files changed

+1287
-1088
lines changed

coverage.xml

Lines changed: 1207 additions & 1073 deletions
Large diffs are not rendered by default.

pyproject.toml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -566,6 +566,7 @@ addopts = [
566566
"--cov-report=html",
567567
"--cov-report=xml",
568568
"--cov-fail-under=80",
569+
"--import-mode=importlib",
569570
]
570571
testpaths = ["tests"]
571572
python_files = ["test_*.py", "*_test.py"]

src/codeweaver/_version.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,6 @@
44
from typing import Final
55

66

7-
__version__: Final[str] = "0.0.1rc295+gfc4f90a"
7+
__version__: Final[str] = "0.0.1rc3+g76d9888"
88

99
__all__ = ("__version__",)

tests/benchmark/chunker/test_performance.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,9 @@
2323
from codeweaver.engine.chunker.selector import ChunkerSelector
2424
from codeweaver.providers.embedding.capabilities.base import EmbeddingModelCapabilities
2525

26+
pytestmark = [pytest.mark.benchmark, pytest.mark.performance, pytest.mark.slow]
27+
28+
2629

2730
# Test data generators
2831
def generate_python_file(num_lines: int) -> str:

tests/contract/test_memory_provider.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,10 +20,10 @@
2020
from codeweaver.core.spans import Span
2121
from codeweaver.providers.vector_stores.inmemory import MemoryVectorStore
2222

23-
2423
pytestmark = pytest.mark.unit
2524

2625

26+
2727
@pytest.fixture
2828
def temp_persist_path():
2929
"""Provide temporary persistence path for testing."""

tests/contract/test_qdrant_provider.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,11 +21,12 @@
2121
from codeweaver.core.spans import Span
2222
from codeweaver.providers.vector_stores.qdrant import QdrantVectorStore
2323

24-
25-
# Mark all tests in this module as requiring Qdrant
2624
pytestmark = [pytest.mark.integration, pytest.mark.external_api]
2725

2826

27+
28+
# Mark all tests in this module as requiring Qdrant
29+
2930
@pytest.fixture
3031
async def qdrant_config():
3132
"""Provide test Qdrant configuration."""

tests/contract/test_vector_store_provider.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@
1616

1717
from codeweaver.providers.vector_stores.base import VectorStoreProvider
1818

19+
pytestmark = [pytest.mark.unit, pytest.mark.validation]
1920

2021
class TestVectorStoreProviderContract:
2122
"""Test VectorStoreProvider abstract interface contract compliance."""

tests/integration/chunker/test_e2e.py

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,9 @@
1414

1515
from codeweaver.engine.chunker.selector import ChunkerSelector
1616

17+
pytestmark = [pytest.mark.integration]
18+
19+
1720

1821
@pytest.fixture
1922
def mock_governor():
@@ -263,6 +266,9 @@ def test_e2e_parallel_dict_convenience():
263266
from codeweaver.engine.chunker.parallel import chunk_files_parallel_dict
264267
from codeweaver.providers.embedding.capabilities.base import EmbeddingModelCapabilities
265268

269+
270+
271+
266272
# Get sample files
267273
fixture_dir = Path("tests/fixtures")
268274
files = []

tests/integration/test_custom_config.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,10 +13,13 @@
1313

1414
from codeweaver.providers.vector_stores.qdrant import QdrantVectorStore
1515

16-
1716
pytestmark = [pytest.mark.integration, pytest.mark.external_api]
1817

1918

19+
20+
21+
22+
2023
async def test_custom_configuration():
2124
"""
2225
User Story: Customize provider settings like collection names.

tests/integration/test_hybrid_ranking.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,10 +17,13 @@
1717
from codeweaver.core.language import SemanticSearchLanguage as Language
1818
from codeweaver.providers.vector_stores.qdrant import QdrantVectorStore
1919

20-
2120
pytestmark = [pytest.mark.integration, pytest.mark.external_api]
2221

2322

23+
24+
25+
26+
2427
async def test_hybrid_search_ranking():
2528
"""
2629
User Story: Hybrid search combines sparse and dense for better relevance.

0 commit comments

Comments
 (0)