We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent f8988b7 commit 72fb240Copy full SHA for 72fb240
pydra/scripts/tests/test_crash.py
@@ -1,16 +1,20 @@
1
+import pytest
2
from pydra.scripts.cli import crash
-from pydra.utils.general import default_run_cache_root
3
from pydra.tasks.testing import Divide
4
from traceback import format_exception
5
import typing as ty
6
7
8
# @pytest.mark.xfail(reason="Need to fix a couple of things after syntax changes")
9
-def test_crash_cli(cli_runner):
+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
+
14
result = cli_runner(
15
crash,
16
[
- f"{default_run_cache_root}/{Divide(x=15, y=0)._checksum}/_error.pklz",
17
+ f"{tmp_path}/{divide._checksum}/_error.pklz",
18
"--rerun",
19
"--debugger",
20
"pdb",
0 commit comments