lasp / lasp/space_packet_parser
Segregate XTCE 1.2 and 1.3 test expectations with a version-aware suite scheme
Nobody has claimed this yet.
- Dominant language
- Python
- Stars
- 39
- Forks
- 15
- Avg merge
- 2d 16h
- Merged PRs (30d)
- 12
Description
Follow-up from review of #291.
#291 added XTCE 1.3 support, which means the test suite now carries expectations for two versions of the standard. A partial split landed in that PR — version-specific tests were moved out of test_definitions.py and test_validation.py into modules with a stated remit:
| module | remit |
|---|---|
tests/unit/test_xtce/test_versions.py |
the version registry itself |
tests/unit/test_xtce/test_xtce_1_3_features.py |
constructs that exist only in 1.3 |
tests/unit/test_xtce/test_version_conversion.py |
detection, retargeting, version-dependent serialization |
tests/unit/test_xtce/test_version_validation.py |
version-dependent validation |
That stops the interleaving, but leaves the mechanical half of the scheme undone.
Remaining work
- A version-parametrized fixture in
tests/conftest.pywithparams=SUPPORTED_XTCE_VERSIONSand idsxtce12/xtce13, so behavior that should be identical across versions is asserted once and runs per version, rather than being written out twice or tested against only one. xtce12/xtce13markers registered inpyproject.toml, applied via module-levelpytestmark, so-m xtce13selects the 1.3 surface.- Version-specific test data under
tests/test_data/xtce_1_3/, movingtest_xtce_1_3.xmlandtest_xtce_1_3_only_features.xmlthere. Note this interacts with the drift-guard test added in #291 (test_xtce_1_3_fixture_tracks_the_1_2_fixture), which pinstest_xtce_1_3.xmlto being a pure version-swap oftest_xtce.xml— the guard should move with the fixture. - Keep
test_encodings.pyversion-neutral. It is currently close to that, but the encoding-level tests for the 1.3 delimiter-only string form should be checked against the boundary. - Consider whether
test_version_conversion.pyandtest_version_validation.pyshould merge once the fixture exists, since some of what separates them today is which module the moved tests came from.
Why not in #291
The PR was already ~8k lines across 23 files, and none of the other review findings depended on this. Doing the suite-wide mechanical change separately keeps both diffs reviewable.
🤖 Generated with Claude Code
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by reading the existing XTCE tests, tests/conftest.py, pyproject.toml, and the drift-guard test from #291. Run the current version-related and encoding tests, then implement the fixture, markers, and test-data layout described in the issue; done means version selection is consistent, the drift guard still works, and test_encodings.py remains version-neutral.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python
- Domain
- testing-qa
- Issue type
- Refactor
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Active
- Clarity
- Mostly clear
- Newbie friendliness
- 48/100