diff options
author | AcriusWinter <152348900+AcriusWinter@users.noreply.github.com> | 2024-08-15 13:52:31 -0700 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-08-15 13:52:31 -0700 |
commit | a965c7c5c881748b084a5b8d116906a065f63456 (patch) | |
tree | 14e180d766b6661e04929547e62fe4479fe2ffb8 | |
parent | 904d43f0e69c18e1cefa52cd14a7cc00090acdcf (diff) | |
download | spack-a965c7c5c881748b084a5b8d116906a065f63456.tar.gz spack-a965c7c5c881748b084a5b8d116906a065f63456.tar.bz2 spack-a965c7c5c881748b084a5b8d116906a065f63456.tar.xz spack-a965c7c5c881748b084a5b8d116906a065f63456.zip |
Open3d: Reinstate re-use of stand-alone test method (#45755)
* open3d: Reinstate re-use of stand-alone test method
* open3d: ignore test_open3d_import when ~python
---------
Co-authored-by: Tamara Dahlgren <35777542+tldahlgren@users.noreply.github.com>
-rw-r--r-- | var/spack/repos/builtin/packages/open3d/package.py | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/var/spack/repos/builtin/packages/open3d/package.py b/var/spack/repos/builtin/packages/open3d/package.py index cd77d5290e..25fca44240 100644 --- a/var/spack/repos/builtin/packages/open3d/package.py +++ b/var/spack/repos/builtin/packages/open3d/package.py @@ -120,11 +120,11 @@ class Open3d(CMakePackage, CudaPackage): @run_after("install") @on_package_attributes(run_tests=True) - def check_import(self): - if "+python" in self.spec: - self.run_test( - python.path, - ["-c", "import open3d"], - purpose="checking import of open3d", - work_dir="spack-test", - ) + def test_open3d_import(self): + """Checking import of open3d""" + if "+python" not in self.spec: + return + + with working_dir("spack-test"): + python = which(python.path) + python("-c", "import open3d") |