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:
		@@ -120,11 +120,11 @@ def install(self, spec, prefix):
 | 
				
			|||||||
 | 
					
 | 
				
			||||||
    @run_after("install")
 | 
					    @run_after("install")
 | 
				
			||||||
    @on_package_attributes(run_tests=True)
 | 
					    @on_package_attributes(run_tests=True)
 | 
				
			||||||
    def check_import(self):
 | 
					    def test_open3d_import(self):
 | 
				
			||||||
        if "+python" in self.spec:
 | 
					        """Checking import of open3d"""
 | 
				
			||||||
            self.run_test(
 | 
					        if "+python" not in self.spec:
 | 
				
			||||||
                python.path,
 | 
					            return
 | 
				
			||||||
                ["-c", "import open3d"],
 | 
					
 | 
				
			||||||
                purpose="checking import of open3d",
 | 
					        with working_dir("spack-test"):
 | 
				
			||||||
                work_dir="spack-test",
 | 
					            python = which(python.path)
 | 
				
			||||||
            )
 | 
					            python("-c", "import open3d")
 | 
				
			||||||
 
 | 
				
			|||||||
		Reference in New Issue
	
	Block a user