Drive the dialect matrix through the command line - #168
Open
eda-s-claude-bot[bot] wants to merge 5 commits into
Open
Drive the dialect matrix through the command line#168eda-s-claude-bot[bot] wants to merge 5 commits into
eda-s-claude-bot[bot] wants to merge 5 commits into
Conversation
MergedTestsuiteSummary.Merge() never touched _startTime, so every merged report lost it - the same shape as the hostname before #162. A merged entity started when the earliest of its parts started, and an entity without a start time contributes nothing rather than erasing what is known. The rule lives on the Merged mixin, so the summary and the test suite share it. Found through the command line: 'pyedaa-reports unittest --merge=Ant-JUnit:... --output=CTest-JUnit:...' failed with "The CTest + JUnit format requires a timestamp on <testsuite>, but the report has none", although the same conversion works when the reader hands its document straight to the writer. The merge in between was dropping it. Six conversions were affected: Ant, CTest and GoogleTest into CTest and GoogleTest. Co-Authored-By: Patrick Lehmann <Paebbels@gmail.com>
The unit-level matrix exercises readers and writers directly. This one runs 'pyedaa-reports' as a user does, so argument parsing, dialect dispatch, console-script wiring and exit codes are covered too - and the two matrices being the same shape is the point: a difference between them is a defect in the layer this one adds. It uses pyTooling.Testing.ApplicationTestcaseMixin rather than another copy of the subprocess helper. Two things only this level can see, both encoded here: * The command line has its own vocabulary. A dialect is spelled '<dialect>-JUnit' and split on '-', so the names the schemas and reports use - 'Ant-JUnit4' and 'GoogleTest-JUnit' - are rejected; it wants 'Ant-JUnit' and 'gtest-JUnit'. 'Any-JUnit' can be read but not written: _output has no branch for it. * A format limit can bite when writing or only when reading back. 'Any-JUnit' to 'pyTest-JUnit' writes happily - 'timestamp' is optional in PyTest-JUnit.xsd - and fails on the way back in, because the reader requires it. The chain is what has to fail, not a particular command. Co-Authored-By: Patrick Lehmann <Paebbels@gmail.com>
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## dev #168 +/- ##
==========================================
- Coverage 31.74% 31.68% -0.07%
==========================================
Files 9 9
Lines 2498 2506 +8
Branches 396 398 +2
==========================================
+ Hits 793 794 +1
- Misses 1705 1712 +7
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Harness. |
tests/app/requirements.txt already includes ../../requirements.txt, which carries pyTooling. Naming it again there duplicates the dependency and breaks packaging, so the floor is raised in the main file instead - and doc/Dependency.rst with it, because that is what gets forgotten. The floor is 8.21: pyTooling.Testing is not part of v8.20.0. This branch cannot go green before the release that ships it. Co-Authored-By: Patrick Lehmann <Paebbels@gmail.com>
It describes how the code got here rather than what a reader needs; the rule lives in the coding guidelines. Co-Authored-By: Patrick Lehmann <Paebbels@gmail.com>
pyTooling.Testing was merged into pyTooling's dev branch before v8.20.0 was released, so the module ships in that release rather than the next one. Co-Authored-By: Patrick Lehmann <Paebbels@gmail.com>
Author
|
|
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.
New Features
tests/app/JUnitDialects.pyruns the dialect conversion matrix through the command line: one class persource dialect, one testcase per target, each invoking
pyedaa-reports unittest --merge=… --output=…,validating the written report against the target schema and reading it back with the target dialect.
The unit-level matrix in
tests/unit/JUnitDialects/exercises readers and writers directly. This one coverswhat only the installed program can: argument parsing, dialect dispatch, console-script wiring and exit codes.
The two are deliberately the same shape - a difference between them is a defect in the layer this one adds.
It uses
pyTooling.Testing.ApplicationTestcaseMixin(pyTooling#266)instead of another copy of the subprocess helper.
Known Issues
Two things only this level sees, both encoded as testcases in
TheCommandLineVocabulary:The command line has its own dialect vocabulary.
_mergesplits the argument on-and expects the secondpart to be
junit, so the names the schemas and reports use are rejected:Ant-JUnit4Ant-JUnitGoogleTest-JUnitgtest-JUnitAny-JUnitcan be read but not written -_outputhas no branch for it, so--output=Any-JUnit:…reports Unsupported JUnit XML dialect for writing.Neither is fixed here; this pull-request records the behaviour so a decision about it is visible.
Unit Tests
Any-JUnitcannot be written, so it is a source only) plus three forthe vocabulary.
tests/app: 8 → 31 passed.Related Issues and Pull-Requests
Stacked on #167. Without it, six cells of this matrix
fail at application level while passing at unit level - which is how that defect was found.
Needs
pyTooling.Testingfrom pyTooling#266. The floor israised in the main
requirements.txt(pyTooling[terminal] >= 8.21, < 10.0) withdoc/Dependency.rstbumped alongside - a derived requirements file must not name a package its included file already carries.
This branch cannot go green before that release.
pyTooling.Testingis not part of v8.20.0, so>= 8.21is a floor that does not exist on PyPI yet;
pip install --dry-runfails accordingly.