mirror of
https://github.com/PyCQA/flake8.git
synced 2026-04-06 13:06:53 +00:00
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.
This commit is contained in:
parent
d599950e6e
commit
51f32bbe93
4 changed files with 15 additions and 45 deletions
|
|
@ -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')
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue