mirror of
https://github.com/python/cpython.git
synced 2025-10-17 12:18:23 +00:00
gh-127085: Add a test skip if multiprocessing isn't available (#128019)
Add a test skip if multiprocessing isn't available.
This commit is contained in:
parent
1183e4ce2f
commit
b9a492b809
1 changed files with 4 additions and 1 deletions
|
@ -739,7 +739,10 @@ class OtherTest(unittest.TestCase):
|
||||||
class RacingTest(unittest.TestCase):
|
class RacingTest(unittest.TestCase):
|
||||||
def test_racing_getbuf_and_releasebuf(self):
|
def test_racing_getbuf_and_releasebuf(self):
|
||||||
"""Repeatly access the memoryview for racing."""
|
"""Repeatly access the memoryview for racing."""
|
||||||
from multiprocessing.managers import SharedMemoryManager
|
try:
|
||||||
|
from multiprocessing.managers import SharedMemoryManager
|
||||||
|
except ImportError:
|
||||||
|
self.skipTest("Test requires multiprocessing")
|
||||||
from threading import Thread
|
from threading import Thread
|
||||||
|
|
||||||
n = 100
|
n = 100
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue