File tree Expand file tree Collapse file tree 1 file changed +21
-0
lines changed Expand file tree Collapse file tree 1 file changed +21
-0
lines changed Original file line number Diff line number Diff line change
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
You can’t perform that action at this time.
0 commit comments