test: move testing integration tests into a pytest suite#205
test: move testing integration tests into a pytest suite#205shenxianpeng merged 4 commits intomainfrom
Conversation
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #205 +/- ##
=======================================
Coverage 96.70% 96.70%
=======================================
Files 4 4
Lines 182 182
=======================================
Hits 176 176
Misses 6 6 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
- Add tests/test_integration.py with 24 parametrized pytest tests covering all scenarios from the pre-commit config YAML files: style-from-file (.clang-format), versions 16-21, style presets (LLVM/Google/Microsoft/WebKit/Mozilla/Chromium with reformat and idempotence checks), verbose flags, and parallel clang-tidy. - Rewrite testing/run.sh: replace the fragile magic-number approach (grep -c 'Failed' == 21) with a run_test() helper that explicitly declares the expected outcome for each scenario and reports pass/fail per test with human-readable descriptions. Agent-Logs-Url: https://github.com/cpp-linter/cpp-linter-hooks/sessions/509b22bb-e65e-4a6f-bc53-52d404732235 Co-authored-by: shenxianpeng <3353385+shenxianpeng@users.noreply.github.com>
5a96fa5 to
73a4dfc
Compare
for more information, see https://pre-commit.ci
|
@copilot fix CI failure https://github.com/cpp-linter/cpp-linter-hooks/actions/runs/24051686613/job/70148606058?pr=205 |
pre-commit clean does not accept a -q/--quiet argument; passing it caused the CI step to exit immediately with exit code 2. Agent-Logs-Url: https://github.com/cpp-linter/cpp-linter-hooks/sessions/99350251-8df1-4994-9492-ca886e0e959f Co-authored-by: shenxianpeng <3353385+shenxianpeng@users.noreply.github.com>
Fixed in 339d642. |
|
@copilot update test versions from 16–22 |
Agent-Logs-Url: https://github.com/cpp-linter/cpp-linter-hooks/sessions/4d67c252-ccfb-4ba3-ae46-d69b30392b7d Co-authored-by: shenxianpeng <3353385+shenxianpeng@users.noreply.github.com>
Done in e791e9a. Added version 22 to the parametrize list in |
|



tests/test_integration.pywith pytest tests covering versions 16–22, style presets, verbose flags, and parallel executiontesting/run.shwith explicit per-test expected outcomes-qflag fromuvx pre-commit cleancalltest_integration.py,pre-commit-config-version.yaml, andrun.sh