diff options
author | AcriusWinter <152348900+AcriusWinter@users.noreply.github.com> | 2024-08-12 16:56:51 -0700 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-08-12 16:56:51 -0700 |
commit | fe19394bf9bcd3af3fd056ea66e6f130a670260c (patch) | |
tree | a7ce159013be1b4a791041b2f6833e5c54f12e69 /var | |
parent | e09955d83b4ff389bf4d495e8ab56616c1998eb7 (diff) | |
download | spack-fe19394bf9bcd3af3fd056ea66e6f130a670260c.tar.gz spack-fe19394bf9bcd3af3fd056ea66e6f130a670260c.tar.bz2 spack-fe19394bf9bcd3af3fd056ea66e6f130a670260c.tar.xz spack-fe19394bf9bcd3af3fd056ea66e6f130a670260c.zip |
py-amrex: old to new test API (#45183)
* py-amrex: test name change
Diffstat (limited to 'var')
-rw-r--r-- | var/spack/repos/builtin/packages/py-amrex/package.py | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/var/spack/repos/builtin/packages/py-amrex/package.py b/var/spack/repos/builtin/packages/py-amrex/package.py index b5dfe578e2..aa3e6d87c5 100644 --- a/var/spack/repos/builtin/packages/py-amrex/package.py +++ b/var/spack/repos/builtin/packages/py-amrex/package.py @@ -115,7 +115,11 @@ class PyAmrex(PythonPackage, CudaPackage, ROCmPackage): 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() |