Skip to content

Share the CDF metadata comparison as a test fixture - #147

Merged
namurphy merged 1 commit into
PlasmaPy:mainfrom
namurphy:share-cdf-metadata-fixture
Nov 19, 2026
Merged

namurphy merged 1 commit into
PlasmaPy:mainfrom
namurphy:share-cdf-metadata-fixture

Conversation

@namurphy

Copy link
Copy Markdown
Member

Summary

This moves _value and _cdf_metadata from tests/decommutator/test_decommutator.py into a new tests/conftest.py without changing them, and makes the comparison available as the cdf_metadata fixture. The fixture compares the CDF metadata that is lost when converting to xarray. The tests for the upcoming L0.5 → L1 step (#136) need the same comparison.

  • test_pfc_decommutator now uses the fixture.
  • test_decommutator.py now uses from __future__ import annotations and imports Callable under TYPE_CHECKING, the same way as conftest.py.
  • INP001 is ignored for tests/**/conftest.py, because the tests directory has no __init__.py.

This was split out of #136 to make that PR smaller.

🤖 Generated with Claude Code

Move the comparison of CDF metadata that is lost when converting to
xarray from the decommutator tests into a cdf_metadata fixture in
tests/conftest.py, so that tests of other steps of the pipeline can
compare their output CDF files with expected ones in the same way.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@namurphy
namurphy merged commit 5675a6a into PlasmaPy:main Nov 19, 2026
17 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant