Skip to content

tests: re-enable caching tests and more cleanups in tests/dsl #175

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 6 commits into
base: develop
Choose a base branch
from

Conversation

romanc
Copy link
Collaborator

@romanc romanc commented Jun 27, 2025

Description

This PR looks at tests under tests/dsl and does some cleanup work. In particular

  • Re-enable tests in tests_caches.py: They were skipped because MPI is always defined (since it's a non-optional import)
  • Fix tests in tests_caches.py: Tests haven't been running since we moved away from python 3.8 (because the python version was hard-coded in there ...)
  • Move make_storage into a utility module (used from two test modules)
  • Run tests in tests/dsl/test_stencil_factory.py with more than one backend
  • Adding type hints and "inlining" single parameter sets.

Just to disambiguate: Some tests (the ones inside tests/mpi) rely on MPI being changed to None in case of a serial run:

from mpi4py import MPI
if MPI.COMM_WORLD.Get_size() == 1:
# not run as a parallel test, disable MPI tests
MPI = None

Tests outside test/mpi import MPI from mpi4py directly and thus check the world size themselves. Might be worth cleaning this up anyway ... or - you know - use pytest.marker instead. Feel free to leave this open if you want to discuss this.

How Has This Been Tested?

Running tests locally.

Checklist:

  • My code follows the style guidelines of this project
  • I have performed a self-review of my own code
  • I have commented my code, particularly in hard-to-understand areas: N/A
  • I have made corresponding changes to the documentation: N/A
  • My changes generate no new warnings
  • Any dependent changes have been merged and published in downstream modules: N/A
  • New check tests, if applicable, are included: N/A

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