Skip to content

Commit 64a57ea

Browse files
author
Wu Jianxiao
committed
Make sure to generate error file in test_crash
1 parent c3b7832 commit 64a57ea

File tree

1 file changed

+7
-2
lines changed

1 file changed

+7
-2
lines changed

pydra/scripts/tests/test_crash.py

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,21 @@
1-
from pydra.scripts.cli import crash
1+
import pytest
22
from pydra.utils.general import default_run_cache_root
3+
from pydra.scripts.cli import crash
34
from pydra.tasks.testing import Divide
45
from traceback import format_exception
56
import typing as ty
67

78

89
# @pytest.mark.xfail(reason="Need to fix a couple of things after syntax changes")
910
def test_crash_cli(cli_runner):
11+
wf = Divide(x=15, y=0)
12+
with pytest.raises(ZeroDivisionError):
13+
wf()
14+
1015
result = cli_runner(
1116
crash,
1217
[
13-
f"{default_run_cache_root}/{Divide(x=15, y=0)._checksum}/_error.pklz",
18+
f"{default_run_cache_root}/{wf._checksum}/_error.pklz",
1419
"--rerun",
1520
"--debugger",
1621
"pdb",

0 commit comments

Comments
 (0)