openpmd-api: Changed from old to new test API (#44764)
* changed from old to new test API * changed test name so it works * small docstring change * fixed skiptest check * made tests check output
This commit is contained in:
parent
901f4b789d
commit
8f0b029308
@ -172,17 +172,10 @@ def check(self):
|
|||||||
# later tests
|
# later tests
|
||||||
ctest("--output-on-failure", "-j1")
|
ctest("--output-on-failure", "-j1")
|
||||||
|
|
||||||
def test(self):
|
def test_run_openpmd_ls(self):
|
||||||
"""Perform smoke tests on the installed package."""
|
"""Test if openpmd-ls runs correctly"""
|
||||||
exes = ["openpmd-ls"] # in 0.11.1+
|
if self.spec.satisfies("@:0.11.0"):
|
||||||
for exe in exes:
|
raise SkipTest("Package must be installed as version 0.11.1 or later")
|
||||||
spec_vers_str = "{0}".format(self.spec.version)
|
exe = which(join_path(self.prefix.bin, "openpmd-ls"))
|
||||||
reason = "test version of {0} is {1}".format(exe, spec_vers_str)
|
out = exe(output=str.split, error=str.split)
|
||||||
self.run_test(
|
assert str(self.spec.version) in out
|
||||||
exe,
|
|
||||||
["--version"],
|
|
||||||
[spec_vers_str],
|
|
||||||
installed=True,
|
|
||||||
purpose=reason,
|
|
||||||
skip_missing=False,
|
|
||||||
)
|
|
||||||
|
Loading…
Reference in New Issue
Block a user