Bug report
Bug description:
In the test._test_multprocessing, the HAVE_GETVALUE constant is always False because the HAVE_BROKEN_SEM_GETVALUE value does not exist in _multiprocessingmodule.
|
HAVE_GETVALUE = not getattr(_multiprocessing, |
|
'HAVE_BROKEN_SEM_GETVALUE', False) |
On macOS, this value exists only in the flagsdict of _multiprocessing.
>>> import _mulitpocessing
>>> vars(_multiprocessing)
{'__name__': '_multiprocessing', '__doc__': None, '__package__': '',
'__loader__': ............ ,
.......
'SemLock': <class '_multiprocessing.SemLock'>,
'flags': {'HAVE_SEM_OPEN': 1, 'HAVE_BROKEN_SEM_GETVALUE': 1}}
Fix is easy and will permit to reactivate the second part of test_bounded_semaphore test.
|
#if HAVE_GETVALUE: |
|
# self.assertRaises(ValueError, sem.release) |
|
# self.assertReturnsIfImplemented(2, get_value, sem) |
A new PR will be submitted soon.
CPython versions tested on:
CPython main branch
Operating systems tested on:
macOS, Linux
Bug report
Bug description:
In the
test._test_multprocessing, theHAVE_GETVALUEconstant is alwaysFalsebecause theHAVE_BROKEN_SEM_GETVALUEvalue does not exist in_multiprocessingmodule.cpython/Lib/test/_test_multiprocessing.py
Lines 141 to 142 in 6f7fb6c
On macOS, this value exists only in the
flagsdict of_multiprocessing.Fix is easy and will permit to reactivate the second part of
test_bounded_semaphoretest.cpython/Lib/test/_test_multiprocessing.py
Lines 1755 to 1757 in 6f7fb6c
A new PR will be submitted soon.
CPython versions tested on:
CPython main branch
Operating systems tested on:
macOS, Linux