Skip to content

Update tests to run only when required modules are present#2349

Open
benowen-bom wants to merge 2 commits intometoppv:masterfrom
benowen-bom:add_import_checks_on_acc_test
Open

Update tests to run only when required modules are present#2349
benowen-bom wants to merge 2 commits intometoppv:masterfrom
benowen-bom:add_import_checks_on_acc_test

Conversation

@benowen-bom
Copy link
Copy Markdown
Contributor

@benowen-bom benowen-bom commented Mar 31, 2026

Addresses #2348.

A number of acceptance tests fail due to missing imports. This PR adds import skips to the specific tests that are failing to ensure the run only when the required module is present.

This also adds a change to the test_apply_rainforests_calibration that moves the import from module level to function level to ensure that the tests are listed in pytest run as skips.

Need to fix failing test on the conda-forge environment
The failing test is unrelated to the fix in this PR. I've opened another ticket on this issue; see #2351.

Testing:

  • Ran tests and they passed OK
  • Added new tests for the new feature(s)

@benowen-bom benowen-bom changed the title WIP: Update tests to run only when required modules are present Update tests to run only when required modules are present Apr 2, 2026
@benowen-bom benowen-bom added the MO review required PRs opened by non-Met Office developers that require a Met Office review label Apr 2, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

MO review required PRs opened by non-Met Office developers that require a Met Office review

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant