Commit 75e8c51
authored
test: improve test coverage to 90%+ (#5)
* test: improve test coverage to 90%+
Expand test suite from 17 tests (22% coverage) to 269 tests (94% coverage).
New test files:
- test_link_traverser.py (~50 tests)
- test_report_generator.py (22 tests)
- test_visual_comparison.py (~57 tests)
Rewritten test files with comprehensive coverage:
- test_cli.py (38 tests)
- test_diff_engine.py (41 tests)
- test_fetcher.py (16 tests)
- test_wayback_cleaner.py (26 tests)
Bug fixes found during testing:
- diff_engine.py: fix compare_structures TypeError on Python 3.14
(SequenceMatcher rejects unhashable dict elements)
- wayback_cleaner.py: fix remove_wayback_header fallback path
skipping content past the meta tag boundary
* fix(ci): add Pillow to requirements.txt
visual_comparison.py imports PIL which requires Pillow. It was in
setup.py but not in requirements.txt used by CI.
* fix: add future annotations import for lazy type evaluation
Resolves NameError when selenium is not installed by making
type annotations lazily evaluated via __future__.annotations.
* fix: add selenium to dev dependencies for visual comparison tests
Tests import selenium directly (TimeoutException, webdriver mock
targets), so it must be present in the test environment.
* fix: add webdriver-manager and numpy to dev dependencies
Tests mock ChromeDriverManager/GeckoDriverManager and import numpy
directly, so both must be present in the test environment.1 parent 5e09d17 commit 75e8c51
12 files changed
Lines changed: 3505 additions & 135 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | 2 | | |
3 | 3 | | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | 2 | | |
3 | 3 | | |
| 4 | + | |
Large diffs are not rendered by default.
0 commit comments