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
|
||||
ctest("--output-on-failure", "-j1")
|
||||
|
||||
def test(self):
|
||||
"""Perform smoke tests on the installed package."""
|
||||
exes = ["openpmd-ls"] # in 0.11.1+
|
||||
for exe in exes:
|
||||
spec_vers_str = "{0}".format(self.spec.version)
|
||||
reason = "test version of {0} is {1}".format(exe, spec_vers_str)
|
||||
self.run_test(
|
||||
exe,
|
||||
["--version"],
|
||||
[spec_vers_str],
|
||||
installed=True,
|
||||
purpose=reason,
|
||||
skip_missing=False,
|
||||
)
|
||||
def test_run_openpmd_ls(self):
|
||||
"""Test if openpmd-ls runs correctly"""
|
||||
if self.spec.satisfies("@:0.11.0"):
|
||||
raise SkipTest("Package must be installed as version 0.11.1 or later")
|
||||
exe = which(join_path(self.prefix.bin, "openpmd-ls"))
|
||||
out = exe(output=str.split, error=str.split)
|
||||
assert str(self.spec.version) in out
|
||||
|
Loading…
Reference in New Issue
Block a user