| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
1 parent 602de0c commit d4b50c9
1 file changed
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -204,11 +204,8 @@ def test_use_shell_cannot_set_on_instance( | |||
| 204 | 204 | instance.USE_SHELL = value | |
| 205 | 205 | ||
| 206 | 206 | ||
| 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 | ||
| 212 | 209 | ||
| 213 | 210 | ||
| 214 | 211 | @pytest.mark.filterwarnings("ignore::DeprecationWarning") | |
@@ -220,8 +217,8 @@ def test_use_shell_preserved_in_multiprocessing( | |||
| 220 | 217 | """The USE_SHELL class attribute pickles accurately for multiprocessing.""" | |
| 221 | 218 | Git.USE_SHELL = value | |
| 222 | 219 | 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 | ||
| 225 | 222 | ||
| 226 | 223 | ||
| 227 | 224 | _EXPECTED_DIR_SUBSET = { | |
| Back | FazBrowse Home | New Git URL |
0 commit comments