lasp / lasp/space_packet_parser

Segregate XTCE 1.2 and 1.3 test expectations with a version-aware suite scheme

Open
#294 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

enhancement
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

  1. A version-parametrized fixture in tests/conftest.py with params=SUPPORTED_XTCE_VERSIONS and ids xtce12 / 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.
  2. xtce12 / xtce13 markers registered in pyproject.toml, applied via module-level pytestmark, so -m xtce13 selects the 1.3 surface.
  3. Version-specific test data under tests/test_data/xtce_1_3/, moving test_xtce_1_3.xml and test_xtce_1_3_only_features.xml there. Note this interacts with the drift-guard test added in #291 (test_xtce_1_3_fixture_tracks_the_1_2_fixture), which pins test_xtce_1_3.xml to being a pure version-swap of test_xtce.xml — the guard should move with the fixture.
  4. Keep test_encodings.py version-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.
  5. Consider whether test_version_conversion.py and test_version_validation.py should 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

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. 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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.