We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 4719b22 commit 3ecf55dCopy full SHA for 3ecf55d
1 file changed
cuda_bindings/tests/test_spawned_process_runner.py
@@ -0,0 +1,21 @@
1
+# Copyright 2025 NVIDIA Corporation. All rights reserved.
2
+# SPDX-License-Identifier: LicenseRef-NVIDIA-SOFTWARE-LICENSE
3
+
4
+# Note: This only covers what is not covered already in test_path_finder_load.py
5
6
+import pytest
7
+from spawned_process_runner import run_in_spawned_child_process
8
9
10
+def child_crashes():
11
+ raise RuntimeError("this is an intentional failure")
12
13
14
+def test_rethrow_child_exception():
15
+ with pytest.raises(ChildProcessError) as excinfo:
16
+ run_in_spawned_child_process(child_crashes, rethrow=True)
17
18
+ msg = str(excinfo.value)
19
+ assert "Child process exited with code 1" in msg
20
+ assert "this is an intentional failure" in msg
21
+ assert "--- stderr-from-child-process ---" in msg
0 commit comments