diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index f02d822..14be9dd 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -122,7 +122,7 @@ jobs: uv run pytest tests/ --verbose --tb=short \ --cov=src --cov-report=xml --cov-report=html \ --cov-report=term-missing \ - --junitxml=test-results.xml || true + --junitxml=test-results.xml - name: Upload backend test results if: always() diff --git a/Makefile b/Makefile index ff5ff99..5fafd66 100644 --- a/Makefile +++ b/Makefile @@ -27,7 +27,7 @@ help: install: @echo "Installing dependencies..." @cd archon-ui-main && npm install - @cd python && uv sync + @cd python && uv sync --group all --group dev @echo "✓ Dependencies installed" # Check environment diff --git a/python/tests/test_async_background_task_manager.py b/python/tests/test_async_background_task_manager.py index 02bbaea..86b7f6b 100644 --- a/python/tests/test_async_background_task_manager.py +++ b/python/tests/test_async_background_task_manager.py @@ -146,7 +146,7 @@ class TestAsyncBackgroundTaskManager: assert len(running_tasks) <= 2 # Wait for all to complete - await asyncio.sleep(0.1) + await asyncio.sleep(0.3) assert len(completed_tasks) == 4 # Clean up diff --git a/python/tests/test_source_id_refactor.py b/python/tests/test_source_id_refactor.py index 3ff796f..8797502 100644 --- a/python/tests/test_source_id_refactor.py +++ b/python/tests/test_source_id_refactor.py @@ -69,20 +69,22 @@ class TestSourceIDGeneration: assert ids[0] == ids[4], "First and last ID should match" def test_url_normalization(self): - """Test that URL normalization works correctly.""" + """Test that URL variations generate consistent IDs based on case differences.""" handler = URLHandler() - # These should all generate the same ID (after normalization) + # Test that URLs with same case generate same ID, different case generates different ID url_variations = [ "https://github.com/Microsoft/TypeScript", - "HTTPS://GITHUB.COM/MICROSOFT/TYPESCRIPT", - "https://GitHub.com/Microsoft/TypeScript", + "https://github.com/microsoft/typescript", # Different case in path + "https://GitHub.com/Microsoft/TypeScript", # Different case in domain ] ids = [handler.generate_unique_source_id(url) for url in url_variations] - # All normalized versions should generate the same ID - assert len(set(ids)) == 1, f"Normalized URLs should generate same ID, got: {set(ids)}" + # First and third should be same (only domain case differs, which gets normalized) + # Second should be different (path case matters) + assert ids[0] == ids[2], f"URLs with only domain case differences should generate same ID" + assert ids[0] != ids[1], f"URLs with path case differences should generate different IDs" def test_concurrent_crawl_simulation(self): """Simulate concurrent crawls to verify no race conditions."""