Skip to content

test: pytest suite + ruff/mypy + CI#4

Merged
solomonneas merged 1 commit into
masterfrom
test/ci-harness
Jul 14, 2026
Merged

test: pytest suite + ruff/mypy + CI#4
solomonneas merged 1 commit into
masterfrom
test/ci-harness

Conversation

@solomonneas

Copy link
Copy Markdown
Collaborator

Adds the test and CI harness the repo was missing. The CLI does bulk destructive operations (block/forget by regex) and previously had zero tests, no linter, and no CI.

What's added

  • 94 unit tests (tests/) over the pure sync logic, no network:
    • response-shape extraction (_extract_data_list, _extract_networks, id parsing)
    • device/profile match resolution, including the ambiguous-query refusal that stops a destructive command acting on the wrong device
    • _filter_devices paths, day/time validation, _fmt_last_active buckets
    • the argparse command surface (every subcommand resolves; required args enforced)
  • [dev] extra (pytest/ruff/mypy) + ruff/mypy/pytest config in pyproject.toml
  • GitHub Actions CI (.github/workflows/ci.yml) running lint + types + tests on push/PR
  • Fixed the pre-existing lint/type findings the new tooling surfaced (all behavior-preserving: timezone.utc->UTC, raise ... from, contextlib.suppress, two mypy narrows, wrapped long help strings)

Verification

ruff check .   -> All checks passed!
mypy           -> Success: no issues found in 3 source files
pytest         -> 94 passed

Test fixtures use RFC 5737 documentation IPs (no real network addresses).

Add 94 unit tests over the pure parse/filter/format helpers (extraction,
device/profile match resolution including the ambiguous-query refusal that
guards destructive commands, day/time validation, argparse surface). Add
[dev] extra (pytest/ruff/mypy) and tool config to pyproject, plus a GitHub
Actions workflow running lint + types + tests on push/PR. Fix the pre-existing
lint/type findings the new tooling surfaced (all behavior-preserving).
@solomonneas
solomonneas merged commit 7b0a154 into master Jul 14, 2026
1 check passed
@solomonneas
solomonneas deleted the test/ci-harness branch July 14, 2026 17:35
solomonneas added a commit that referenced this pull request Jul 15, 2026
test: pytest suite + ruff/mypy + CI
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant