feat: add opt-in integration test suite (#23)#57
Conversation
Integration tests exercise wl-paste/xclip/pbpaste/PowerShell against a real clipboard daemon. Skipped by default via pytest marker config; run with `uv run pytest -m integration`. Tests cover: text round-trip, unicode, multiline, special characters, format listing, and unavailable MIME type handling. Closes #23 Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Codecov Report✅ All modified and coverable lines are covered by tests. 📢 Thoughts on this report? Let us know! |
|
Applying |
cmeans
left a comment
There was a problem hiding this comment.
QA Review — PR #57
Verdict: Zero findings. Ready for maintainer signoff.
Checkboxes verified
CHECKBOX 1: pytest -q (default) → 450 passed, 6 deselected, 8 xfailed (matches PR body)
CHECKBOX 2: pytest -m integration -v → 6/6 PASSED (real clipboard, Wayland/Fedora 43)
CHECKBOX 3: CI passes → All green (lint, typecheck, test matrix, codecov)
All checkboxes ticked. Integration tests run against real clipboard on this machine — not just checked for skip behavior.
Code review
Marker config: addopts = "-m 'not integration'" in pyproject.toml skips integration by default. Opt-in with -m integration. Standard pytest pattern. ✓
Test coverage (6 tests):
- Plain text round-trip, unicode (emoji + CJK), multiline, special chars (pipes, quotes, angles, ampersands), format listing after write, empty MIME returns empty
- All use the public API (
write_clipboard/read_clipboard/list_clipboard_formats) — exercises real code paths ✓ .strip()on read results handles platform-specific trailing newline differences ✓pytestmark = pytest.mark.integrationapplies to all tests in the file ✓
Doc updates: CONTRIBUTING.md dev setup block and integration test paragraph, CLAUDE.md commands section — both accurate, both reference the -m integration flag. CONTRIBUTING.md ties it to #5 and #10 (platform testers). ✓
Other checks
- CHANGELOG: New
## [Unreleased]/### Added— correct (v2.1.1 just released, new feature). Accurate.Closes #23. ✓ - CI: All green. Integration tests correctly deselected (6 deselected visible in default run). ✓
- Diff scope: 5 files, +96/-2, single commit. Clean. ✓
Findings
None.
Summary
tests/test_integration.pywith 6 tests exercising real clipboard toolsintegrationconfigured inpyproject.toml-- skipped by defaultuv run pytest -m integration(requires clipboard daemon)CONTRIBUTING.mdandCLAUDE.mdwith integration test commandsTest plan
uv run pytest -q-- 450 passed, 6 deselected, 8 xfailed (integration skipped)uv run pytest -m integration -v-- 6 passed (on a machine with clipboard)Closes #23