py-amrex: old to new test API (#45183)

* py-amrex: test name change
This commit is contained in:
AcriusWinter 2024-08-12 16:56:51 -07:00 committed by GitHub
parent e09955d83b
commit fe19394bf9
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -115,7 +115,11 @@ def copy_test_sources(self):
install test subdirectory for use during `spack test run`."""
cache_extra_test_sources(self, [self.tests_src_dir])
def test(self):
def test_pytest(self):
"""Perform smoke tests on the installed package."""
pytest = which("pytest")
pytest(join_path(install_test_root(self), self.tests_src_dir))
test_dir = join_path(self.test_suite.current_test_cache_dir, self.tests_src_dir)
with working_dir(test_dir):
pytest = which("pytest")
# TODO: Remove once test dependencies made available
assert pytest is not None, "Make sure a suitable 'pytest' is in your path"
pytest()