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>
This commit is contained in:
parent
904d43f0e6
commit
a965c7c5c8
@ -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")
|
||||
|
Loading…
Reference in New Issue
Block a user