File tree Expand file tree Collapse file tree 1 file changed +4
-7
lines changed Expand file tree Collapse file tree 1 file changed +4
-7
lines changed Original file line number Diff line number Diff line change @@ -204,11 +204,8 @@ def test_use_shell_cannot_set_on_instance(
204204 instance .USE_SHELL = value
205205
206206
207- def _check_use_shell_in_worker (value : bool ) -> None :
208- # USE_SHELL should have the value set in the parent before starting the worker.
209- assert Git .USE_SHELL is value
210-
211- # FIXME: Check that mutation still works and raises the warning.
207+ def _get_value_in_current_process () -> bool :
208+ return Git .USE_SHELL
212209
213210
214211@pytest .mark .filterwarnings ("ignore::DeprecationWarning" )
@@ -220,8 +217,8 @@ def test_use_shell_preserved_in_multiprocessing(
220217 """The USE_SHELL class attribute pickles accurately for multiprocessing."""
221218 Git .USE_SHELL = value
222219 with ProcessPoolExecutor (max_workers = 1 ) as executor :
223- # Calling result() marshals any exception back to this process and raises it.
224- executor . submit ( _check_use_shell_in_worker , value ). result ()
220+ marshaled_value = executor . submit ( _get_value_in_current_process ). result ()
221+ assert marshaled_value is value
225222
226223
227224_EXPECTED_DIR_SUBSET = {
You can’t perform that action at this time.
0 commit comments