From a965c7c5c881748b084a5b8d116906a065f63456 Mon Sep 17 00:00:00 2001 From: AcriusWinter <152348900+AcriusWinter@users.noreply.github.com> Date: Thu, 15 Aug 2024 13:52:31 -0700 Subject: 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> --- var/spack/repos/builtin/packages/open3d/package.py | 16 ++++++++-------- 1 file 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") -- cgit v1.2.3-70-g09d2