Skip to content

Commit

Permalink
Open3d: Reinstate re-use of stand-alone test method (spack#45755)
Browse files Browse the repository at this point in the history
* open3d: Reinstate re-use of stand-alone test method
* open3d: ignore test_open3d_import when ~python

---------

Co-authored-by: Tamara Dahlgren <[email protected]>
  • Loading branch information
AcriusWinter and tldahlgren authored Aug 15, 2024
1 parent 904d43f commit a965c7c
Showing 1 changed file with 8 additions and 8 deletions.
16 changes: 8 additions & 8 deletions var/spack/repos/builtin/packages/open3d/package.py
Original file line number Diff line number Diff line change
Expand Up @@ -120,11 +120,11 @@ def install(self, spec, prefix):

@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")

0 comments on commit a965c7c

Please sign in to comment.