Conversation
|
Before looking at the code, I'm not sure how worth it is to add a test suite to these set of scripts really... The code is in a state that only minimal changes and fixes are being done and very few new features are added, and those would probably break plenty of tests which might or might not be that useful. Anyway, I wanted to give this first impression before reviewing the code. |
gforcada
left a comment
There was a problem hiding this comment.
Nice job, and I'm specially grateful that you used some AI to generate them, as I find them not that useful in practice, but as you did not have (hopefully) to spend too much time on it, then it is not too bad.
I'm +1 on the test_shared ones, but rather +0 to -1 for the test_config_package.py tests, as they might be quite brittle to maintain as we evolve the script.
|
Do we need testing this? As you noticed I am exploring to work with AI agents on code. Having tests is the only sane way to have a verification loop there and catch regressions. And for humans it doe not hurt too. |
12bf736 to
dced8e2
Compare
It is not used anywhere.
As we never touched this file it was still pointing to `zopefoundation` organization.
As it was copied and forgot, the GHA filename was never updated.
Add 113 pytest tests covering all modules with 75% overall coverage. All shared utilities achieve 100% coverage. Tests use tmp_path fixtures and unittest.mock to avoid real subprocess/git calls. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Run pytest across all supported Python versions in CI alongside the existing QA (lint) job. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
They basically provide not really meaningful, as in that they will alert you if something breaks.
Skip the few one off scripts that we are not testing.
Skip test coverage on a few functions that have not really logic, but are rather scaffolding.
dced8e2 to
a76642f
Compare
Summary
[project.optional-dependencies],[tool.pytest.ini_options],[testenv:test]in toxtmp_pathfixtures andunittest.mockto avoid real subprocess/git callsCoverage breakdown
Test plan
uv run --extra test pytest -v— 113 tests passuv run --extra test pytest --cov=plone.meta— 75% coverage🤖 Generated with Claude Code