Parameterize data-based tests and make data path configurable - #58
Open
krystophny wants to merge 1 commit into
Open
Parameterize data-based tests and make data path configurable#58krystophny wants to merge 1 commit into
krystophny wants to merge 1 commit into
Conversation
Add pytest command-line options --data-path/--code-path so the shared data and code roots can be passed on the command line with fallback to the DATA/CODE environment variables. Parametrize the EQDSK and efit_to_boozer tests over the standard reference data files so each is a distinct test case, and remove the module-level invocation from the standalone NEO-RT benchmark util test so it runs once under pytest.
krystophny
commented
Aug 8, 2026
krystophny
left a comment
Member
Author
There was a problem hiding this comment.
Review verdict: Comment
Summary: The test-only changes are scoped and syntactically sound; parameterization and path overrides preserve existing behavior.
Findings: No findings.
Verdict: Comment — no defect found, but CI is still in progress and libneo tests could not be run locally.
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.
Summary
Closes #6
This change makes the data-based test suite configurable and properly
parameterized:
Configurable data/code paths via command line. The
data_pathandcode_pathfixtures intests/conftest.pynow accept the new--data-path/--code-pathpytest command-line options (as suggestedby the linked StackOverflow discussion) and fall back to the
DATA/CODEenvironment variables when the options are not given. This makesit possible to point the tests at the "standard data" directory on any
machine without relying on fixed environment variables.
Parameterized tests over standard data. The EQDSK tests
(
test_eqdsk_read,test_eqdsk_golden_records) and theefit_to_boozerq-profile comparison are now driven by@pytest.mark.parametrizeover the set of standard reference datafiles instead of looping manually. Each data file is reported as its
own test case, so failures are easier to isolate and individual files
can be selected or deselected.
Move tests upstream / clean standalone tests. The standalone NEO-RT
benchmark
test_utilno longer invokes the test at module import time,so it runs exactly once as a proper pytest test and does not execute
when merely imported elsewhere.
Tests
--data-path/--code-pathoptions work and produce a clearUsageErrorwhen neither an option nor the environment variable is set.separate test case.
test_util.pywith pytest(
1 passed).libneoPython module is not shipped in this repository (it is clonedseparately in CI), but the changes are syntactically valid and follow
the existing parametrize pattern.