Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ Format follows [Keep a Changelog](https://keepachangelog.com/). Versions follow

### Added

- **Stricter `_get_current_version` fallback assertion** (closes #32): `TestVersionHelpers::test_get_current_version_falls_back_on_metadata_failure` now asserts exact equality with `cli.__version__` instead of `isinstance(..., str)`. The old assertion would have passed for any string, silently missing a regression that returned a wrong value from the `except` branch. Mirrors the exact-value assertion already used for `_resolve_version`'s `"0.0.0"` fallback in `TestResolveVersion`.
- **Test coverage push to 100% on pure-logic modules**: 188 new tests bring every pure-logic module (`__init__.py`, `blocklist.py`, `cli.py`, `clickbait.py`, `config.py`, `scheduler.py`, `state.py`) to 100% line coverage. Overall coverage rose from 44% to 64% — the gap is almost entirely `browser.py` / `diagnostics.py`, which are Playwright automation and are intentionally left at their natural (low) coverage. `pyproject.toml` now enforces `fail_under = 60` in `[tool.coverage.report]` as a regression guard, and `.coverage` / `coverage.xml` / `htmlcov/` are gitignored.
- **Codecov coverage reporting** in CI: `pytest-cov>=7.0` added as a dev dependency, `[tool.coverage.*]` configuration added to `pyproject.toml`, and a `codecov/codecov-action@v5` upload step now runs on the Ubuntu CI job. A Codecov badge is displayed in the README.
- README status badges (PyPI version, supported Python versions, license, CI, download count) and `.github/FUNDING.yml` for GitHub Sponsors — brings the project in line with the `cmeans/mcp-*` repo conventions.
Expand Down
3 changes: 2 additions & 1 deletion tests/test_cli.py
Original file line number Diff line number Diff line change
Expand Up @@ -188,8 +188,9 @@ def boom(_name):

# Patch the importlib.metadata.version function at the source.
monkeypatch.setattr(importlib.metadata, "version", boom)
from yt_dont_recommend import cli as cli_mod
from yt_dont_recommend.cli import _get_current_version
assert isinstance(_get_current_version(), str)
assert _get_current_version() == cli_mod.__version__

def test_version_tuple_valid(self):
from yt_dont_recommend.cli import _version_tuple
Expand Down
Loading