Skip to content

Commit

Permalink
Add a test skip if multiprocessing isn't available.
Browse files Browse the repository at this point in the history
  • Loading branch information
freakboy3742 committed Dec 17, 2024
1 parent cfeaa99 commit 031e3b3
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 031e3b3

Please sign in to comment.