diff options
| author | Anthony Sottile <asottile@umich.edu> | 2019-10-28 09:17:59 -0700 |
|---|---|---|
| committer | Anthony Sottile <asottile@umich.edu> | 2019-10-28 09:43:30 -0700 |
| commit | 51f32bbe93497143b204b95b7ca5513e61754fef (patch) | |
| tree | ffa70a83a56af9aeb0dd5a5e124f239e868731b3 /tests | |
| parent | d599950e6ee19ecf0a05e527cd1381ce71182a24 (diff) | |
| download | flake8-51f32bbe93497143b204b95b7ca5513e61754fef.tar.gz | |
Only use multiprocessing when the method is fork
In python3.8 on macos and in all versions on windows the multiprocessing
method is `spawn` which does not preserve class state.
Diffstat (limited to 'tests')
| -rw-r--r-- | tests/unit/test_checker_manager.py | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/tests/unit/test_checker_manager.py b/tests/unit/test_checker_manager.py index 2a6998e..28087fe 100644 --- a/tests/unit/test_checker_manager.py +++ b/tests/unit/test_checker_manager.py @@ -34,7 +34,7 @@ def test_oserrors_cause_serial_fall_back(): assert serial.call_count == 1 -@mock.patch('flake8.utils.is_windows', return_value=False) +@mock.patch('flake8.checker._multiprocessing_is_fork', return_value=True) def test_oserrors_are_reraised(is_windows): """Verify that unexpected OSErrors will cause the Manager to reraise.""" err = OSError(errno.EAGAIN, 'Ominous message') |
