Skip to content

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

Description

@medley56

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 Add support for XTCE 1.3 alongside XTCE 1.2 #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

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions