Skip to content

test: run the Python suite in a working folder of its own - #196

Merged
SMI-Lab-Inha merged 1 commit into
devfrom
fix/python-test-workdir
Dec 3, 2026
Merged

SMI-Lab-Inha merged 1 commit into
devfrom
fix/python-test-workdir

Conversation

@SMI-Lab-Inha

Copy link
Copy Markdown
Owner

Problem

python_package ran pytest in the build folder. An in-memory deck (DeckFile.from_text) takes its side files (wave_frequencies.txt, current_profile.txt, ...) from the working directory, and the Fortran test wavekin_modes writes wave_frequencies.txt into the same build folder. Under ctest -j the two overlap.

In a local Release run (Prescott kernel, 438 of 439) the parity test failed:

FAILED python/tests/test_deck_native_parity.py::test_standalone_mixed_deck_runs_on_the_aggregate_in_its_current
Expected regex: 'WaveKin 7 waves are not supported'
Actual message: '<in-memory deck>: WaveKin 7: wave_frequencies.txt needs at least two `omega Re Im` rows'

The Haswell run of the same build passed: the result depended on what wavekin_modes had written at that moment, not on the kernel.

Change

python_package runs in build/python_package_cwd, a folder no test writes into (WORKING_DIRECTORY in CMakeLists.txt).

Tests

Setup One-row wave_frequencies.txt in the build folder
before: pytest run from the build folder fails with the message above
after: ctest -R python_package full Python suite passes

pre-commit passes on CMakeLists.txt.

python_package ran pytest in the build folder. An in-memory deck
(DeckFile.from_text) takes its side files from the working directory,
and wavekin_modes writes wave_frequencies.txt there. Under ctest -j the
two overlap: in a Release run on the Prescott kernel the parity test
test_standalone_mixed_deck_runs_on_the_aggregate_in_its_current read a
half-written file and got "wave_frequencies.txt needs at least two
`omega Re Im` rows" instead of the refusal it checks (the Haswell run of
the same build passed). A one-row wave_frequencies.txt in the build
folder reproduces it with the old working folder.

python_package now runs in build/python_package_cwd, which no test
writes into; the suite passes there with that file in the build folder.

Signed-off-by: Jae Hoon Seo <jaehoon.seo@inha.ac.kr>
@SMI-Lab-Inha

Copy link
Copy Markdown
Owner Author

@codex review

@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Dec 3, 2026 •

Copy link
Copy Markdown
Codex Review Summary: ✅ Completed

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-12-03T10:15:47.667394Z 8ed24f0 Manual request
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@read-the-docs-community

Copy link
Copy Markdown

📖 7 files modified


Preview · build overview · CableDyn · built Dec. 3, 2026, 10:15 a.m. UTC

@chatgpt-codex-connector

Copy link
Copy Markdown

Codex Review: Didn't find any major issues. Keep it up!

Reviewed commit: 8ed24f0b0d

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

@SMI-Lab-Inha
SMI-Lab-Inha merged commit ca7eedd into dev Dec 3, 2026
22 checks passed
@SMI-Lab-Inha
SMI-Lab-Inha deleted the fix/python-test-workdir branch December 4, 2026 04:21
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