Skip to content

test(subset_data): make unit test work outside NCAR cluster, like its siblings do - #4231

Merged
ekluzek merged 1 commit into
ESCOMP:b4b-devfrom
johnpaulalex:fix/ctsm-py-test-fixes
Sep 30, 2026
Merged

ekluzek merged 1 commit into
ESCOMP:b4b-devfrom
johnpaulalex:fix/ctsm-py-test-fixes

Conversation

@johnpaulalex

Copy link
Copy Markdown
Contributor

Description of changes

Have one test case pass 'testing=true' into setup_files(), like its siblings already do, so that it skips checking for a specific /glade file.

Specific notes

Contributors other than yourself, if any:

  • None

CTSM issues resolved or otherwise addressed, if any:

  • None

Description of generative AI usage:
Google Antigravity was used to write the code and tests, followed by human-guided verification.

Any user interface changes (namelist or namelist defaults changes)?
None

Testing planned or performed, if any:

  • Ran CTSM Python unit test suite: conda run -n ctsm_pylib ./run_ctsm_py_tests -u (all 602 tests pass cleanly).
  • Verified black formatting (black --check python/ctsm/test/test_unit_subset_data.py) and pylint (score: 9.97/10).

Requirements before merge:

  • I have followed the CTSM contribution guidelines.
  • The code in this PR branch builds with no errors.
  • The code in this PR branch runs with no errors. Briefly describe tested configuration(s):
    Tested on macOS (Apple Silicon arm64) using the ctsm_pylib conda environment via ./run_ctsm_py_tests -u.
  • This either (a) does not change answers, (b) it only changes answers at roundoff level, or (c) I have performed a scientific evaluation of the answer changes. Which?:
    (a) does not change answers (test-only change).
  • I have reviewed relevant parts of the CLM documentation Tech Note or User's Guide to determine if anything needs to be changed or added. If it does, describe:
  • This PR either (a) does not create a need to update the documentation or (b) includes required documentation updates (see guidelines for contributing documentation). Which?:
    (a) does not create a need to update documentation.

… siblings do

Have one test case pass 'testing=true' into setup_files(), like its siblings already do, so that it skips checking for a specific /glade file.

Assisted-by: gemini-3.8-flash:1.0
@ekluzek ekluzek added enhancement new capability or improved behavior of existing capability testing additions or changes to tests next this should get some attention in the next week or two. Normally each Thursday SE meeting. b4b bit-for-bit labels Sep 30, 2026

@ekluzek ekluzek left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This looks good. I checked to make sure instances of setup_files had testing=True, or didn't need it. The instances that don't need it are fail tests with bad input (like a missing directory) is sent in. So they don't need it.

@ekluzek

ekluzek commented Sep 30, 2026

Copy link
Copy Markdown
Contributor

I'm just going to merge this in, as the testing was done.

@ekluzek
ekluzek merged commit 1ec14bb into ESCOMP:b4b-dev Sep 30, 2026
6 checks passed
@johnpaulalex

Copy link
Copy Markdown
Contributor Author

Thanks @ekluzek !

@slevis-lmwg slevis-lmwg mentioned this pull request Oct 1, 2026
12 tasks done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

b4b bit-for-bit enhancement new capability or improved behavior of existing capability next this should get some attention in the next week or two. Normally each Thursday SE meeting. testing additions or changes to tests

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants