Skip to content

Commit

Permalink
gh-127085: Add a test skip if multiprocessing isn't available (#128019)
Browse files Browse the repository at this point in the history
Add a test skip if multiprocessing isn't available.
  • Loading branch information
freakboy3742 authored Dec 17, 2024
1 parent 1183e4c commit b9a492b
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion Lib/test/test_memoryview.py
Original file line number Diff line number Diff line change
Expand Up @@ -739,7 +739,10 @@ def test_picklebuffer_reference_loop(self):
class RacingTest(unittest.TestCase):
def test_racing_getbuf_and_releasebuf(self):
"""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

n = 100
Expand Down

0 comments on commit b9a492b

Please sign in to comment.