Skip to content

Switch to new pytest runner#96

Merged
rjleveque merged 20 commits intoclawpack:masterfrom
mandli:new-pytest-test-runner
Apr 4, 2026
Merged

Switch to new pytest runner#96
rjleveque merged 20 commits intoclawpack:masterfrom
mandli:new-pytest-test-runner

Conversation

@mandli
Copy link
Copy Markdown
Member

@mandli mandli commented May 22, 2025

This PR changes the way we are doing testing on a larger scale and adds some new capabilities:

  • Uses pytest more directly than the previous tests based on UnitTest
  • Significant code simplification of both the test scaffoloding and individual tests
  • Gives full control of the output (temporary) directory to the test via the commandline pytest --basetemp=
  • Can specify which setrun is used by path and removes problems with collision of names
  • Uses some pytest fixtures to provide other functionality meaning that they can also be expanded

There are a number of other advantages to this approach including using other plugins for PyTest in the future.

@mandli mandli marked this pull request as draft May 22, 2025 04:05
@mandli mandli requested a review from rjleveque July 28, 2025 16:37
@mandli mandli marked this pull request as ready for review July 28, 2025 16:37
@mandli
Copy link
Copy Markdown
Member Author

mandli commented Jul 28, 2025

We can merge this or not, but it provides a proof of concept that we could do this. I think this may help a lot with more complex testing, such as with the adjoint tests, and help with the use of alternative setrun.py files from arbitrary locations.

@mandli mandli marked this pull request as draft September 15, 2025 15:57
@mandli
Copy link
Copy Markdown
Member Author

mandli commented Sep 15, 2025

Moved the generic code for the test runner into clawutil now, see clawpack/clawutil#96 for details.

@mandli mandli marked this pull request as ready for review March 16, 2026 14:15
mandli added 6 commits March 16, 2026 13:55
Also adds more comments to the example test in acoustics_1d_heterogenous.
This brings up to date testing for classic with what was done in GeoClaw.
This currently does not have any python tests, and if they are added, the
testing.yml would need to be updated.  There's also no slow test
functionality.
@rjleveque
Copy link
Copy Markdown
Member

Looks good and have discussed with @mandli. I'll merge this one, and also in amrclaw, geoclaw , so we can move forward.

@rjleveque rjleveque merged commit 736ab90 into clawpack:master Apr 4, 2026
6 checks passed
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.

2 participants