test: fix all failing tests and improve test infrastructure#8
Merged
Conversation
Major test fixes: - Fixed 139 failing tests and 33 collection errors - All 1747 tests now pass (25 intentionally skipped) - Coverage improved from ~57% to 64% Key changes: - Fixed import path issues after module refactoring (url_validator, pipeline, batch_validator packages) - Updated mock paths to match new package structure - Fixed API signature mismatches in tests (process_batch vs batch_process, etc.) - Added missing imports (pandas in import_module.py) - Fixed @contextmanager bug in stream_items (was yielding multiple times) - Updated test assertions to match current implementation behavior - Added AIProcessingResult.url property for pipeline compatibility Source code fixes: - bookmark_processor/core/ai_processor.py: Added url property alias - bookmark_processor/core/batch_validator/__init__.py: Fixed lazy loader package context - bookmark_processor/core/import_module.py: Added pandas import, fixed _is_raindrop_csv - bookmark_processor/core/content_analyzer.py: Fixed BookmarkMetadata constructor - bookmark_processor/core/pipeline.py: Fixed checkpoint restoration compatibility - bookmark_processor/utils/memory_optimizer.py: Removed incorrect @contextmanager Test files updated: - 20+ test files with corrected mock paths and API usage - tests/fixtures/mock_utilities.py: Added iter_content method Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Key Changes
Source Code Fixes
bookmark_processor/core/ai_processor.py: Addedurlproperty alias for pipeline compatibilitybookmark_processor/core/batch_validator/__init__.py: Fixed lazy loader package context for relative importsbookmark_processor/core/import_module.py: Added pandas import, fixed_is_raindrop_csvmethodbookmark_processor/core/content_analyzer.py: FixedBookmarkMetadataconstructor callsbookmark_processor/core/pipeline.py: Fixed checkpoint restoration for both Bookmark and AIProcessingResult formatsbookmark_processor/utils/memory_optimizer.py: Removed incorrect@contextmanagerdecorator fromstream_itemsTest Infrastructure
process_batchvsbatch_process, etc.)Test Results
Coverage
Test Plan
🤖 Generated with Claude Code