Skip to content

Commit 72fb240

Browse files
Wu Jianxiaotclose
authored andcommitted
Make sure to generate error file in test_crash
1 parent f8988b7 commit 72fb240

File tree

1 file changed

+7
-3
lines changed

1 file changed

+7
-3
lines changed

pydra/scripts/tests/test_crash.py

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,20 @@
1+
import pytest
12
from pydra.scripts.cli import crash
2-
from pydra.utils.general import default_run_cache_root
33
from pydra.tasks.testing import Divide
44
from traceback import format_exception
55
import typing as ty
66

77

88
# @pytest.mark.xfail(reason="Need to fix a couple of things after syntax changes")
9-
def test_crash_cli(cli_runner):
9+
def test_crash_cli(cli_runner, tmp_path):
10+
divide = Divide(x=15, y=0)
11+
with pytest.raises(ZeroDivisionError):
12+
divide(cache_root=tmp_path)
13+
1014
result = cli_runner(
1115
crash,
1216
[
13-
f"{default_run_cache_root}/{Divide(x=15, y=0)._checksum}/_error.pklz",
17+
f"{tmp_path}/{divide._checksum}/_error.pklz",
1418
"--rerun",
1519
"--debugger",
1620
"pdb",

0 commit comments

Comments
 (0)