]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
GH-106214: Fix `test_opcache` to skip threaded tests on non-threaded platforms (GH... 106215/head
authorHood Chatham <roberthoodchatham@gmail.com>
Wed, 28 Jun 2023 20:04:59 +0000 (13:04 -0700)
committerGitHub <noreply@github.com>
Wed, 28 Jun 2023 20:04:59 +0000 (13:04 -0700)
This skips the test added in GH-105953 on threadless builds.

Lib/test/test_opcache.py

index 2f6f91ded248bb7eae40d80d483ecf583a1a112d..564dc4745ae64ed9539acfaab789a04dca42cd90 100644 (file)
@@ -2,6 +2,7 @@ import dis
 import threading
 import types
 import unittest
+from test.support import threading_helper
 
 
 class TestLoadSuperAttrCache(unittest.TestCase):
@@ -484,6 +485,7 @@ class TestCallCache(unittest.TestCase):
             f()
 
 
+@threading_helper.requires_working_threading()
 class TestRacesDoNotCrash(unittest.TestCase):
     # Careful with these. Bigger numbers have a higher chance of catching bugs,
     # but you can also burn through a *ton* of type/dict/function versions: