Add testing reference to wb-dev#37
Closed
ilyatikhonyuk wants to merge 3 commits into
Closed
Conversation
New references/testing.md: how tests are organized in WB Python services — tests/ layout with captured fixture data and golden files, pytest black-box style, WB fixture patterns (fake sysroot in tmp_path, factory mocks, autouse state reset, boundary patches), and the three run levels (local pytest, pybuild during .deb build, Jenkins coverage flags). Distilled from wb-cloud-agent, wb-nm-helper, wb-diag-collect and wb-ai-skills; the service template itself ships no tests. SKILL.md gets a Testing section pointing at the reference. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
…g-reference # Conflicts: # .claude-plugin/plugin.json # debian/changelog # pyproject.toml # wb_cli/__init__.py
aadegtyarev
self-requested a review
July 15, 2026 12:30
The service template intentionally ships without tests; the guide applies when the need arises, its absence is not a per-project gap. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Contributor
Author
|
Wrong repo — this content belongs in the private marketplace. Migrated as-is (including the 'tests are added when needed' clarification) to wirenboard/wb-agent-tools#74 as the new wb-development:python-testing skill. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What changed
wb-dev: newreferences/testing.md— the how-to for tests in WB Python services that no skill covered:tests/at the repo root with__init__.py(pybuild discovers the suite by package),conftest.py, onetest_<module>.pyper production module,tests/data/with artefacts captured from real controllers and golden files next to inputs;fw-unittestson the firmware side);tmp_path,autousemodule-state reset,patchat the process boundary,monkeypatchforsys.argv;pytest(+ coverage commands fromcodestyle/python.ru.md), pybuild during the .deb build (WBDEV_PYBUILD_TEST_ARGS), Jenkins flags (defaultRunCoverage,defaultCoverageMin— per-repo, don't lower);tests/test_version.py.wb-devSKILL.md: new short Testing section pointing at the reference.Why
The skills covered firmware testing (
fw-unittests,fw-integration-tests) and process requirements (a PR needs tests —wb-git), but not how to add tests to a Python service.wb-python-service-templateships no tests at all, so an agent bootstrapping a service had no pattern to follow. The reference distills the actual conventions fromwb-cloud-agent,wb-nm-helper,wb-diag-collectand this repo's own suite.Test plan
Doc-only. Every pattern in the reference is backed by a named production repo; the Jenkins flag examples are copied verbatim from live Jenkinsfiles (
wb-cloud-agent,wb-nm-helper).Risks
🤖 Generated with Claude Code