Fix python import tests (#38928)

Running `spack test run <python package>` resulted in the error
```
'str' object is not callable
```
because the python executable was not set correctly.
This commit is contained in:
Manuela Kuhn
2023-07-17 22:19:47 +02:00
committed by GitHub
parent cc73789744
commit 884b4952af

View File

@@ -173,7 +173,7 @@ def test_imports(self):
# Make sure we are importing the installed modules, # Make sure we are importing the installed modules,
# not the ones in the source directory # not the ones in the source directory
python = inspect.getmodule(self).python.path python = inspect.getmodule(self).python
for module in self.import_modules: for module in self.import_modules:
with test_part( with test_part(
self, self,