Skip to content

Commit 2b0e1d2

Browse files
committed
touching up test_package
1 parent ddb4d90 commit 2b0e1d2

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

nipype2pydra/tests/test_package.py

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,8 @@
11
import sys
22
import shutil
33
import subprocess as sp
4+
import traceback
5+
import re
46
import pytest
57
import toml
68
from nipype2pydra.cli import pkg_gen, convert
@@ -91,8 +93,8 @@ def test_package_complete(package_spec, cli_runner, tmp_path, tasks_template_arg
9193
except sp.CalledProcessError:
9294
raise RuntimeError(
9395
f"Tests of generated package '{pkg_name}' failed when running, "
94-
f"'\n{' '.join(pytest_cmd)}':\n\n{pytest_output}"
96+
f"'\n{' '.join(pytest_cmd)}':\n\n{traceback.format_exc()}"
9597
)
9698

97-
assert "fail" not in pytest_output
98-
assert "error" not in pytest_output
99+
assert not re.findall(r"\bFAIL\b", pytest_output)
100+
assert not re.findall(r"\bERROR\b", pytest_output)

0 commit comments

Comments
 (0)