aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/Lib/test/test_class.py
diff options
context:
space:
mode:
authorSam Gross <colesbury@gmail.com>2025-02-04 17:44:59 -0500
committerGitHub <noreply@github.com>2025-02-04 17:44:59 -0500
commite5f10a741408206e61cf793451cbd373bbe61594 (patch)
treedf6041d6468726a34fb07667f8304200bbe07d41 /Lib/test/test_class.py
parent285c1c4e9543299c8bf69ceb39a424782b8c632e (diff)
downloadcpython-e5f10a741408206e61cf793451cbd373bbe61594.tar.gz
cpython-e5f10a741408206e61cf793451cbd373bbe61594.zip
gh-127933: Add option to run regression tests in parallel (gh-128003)
This adds a new command line argument, `--parallel-threads` to the regression test runner to allow it to run individual tests in multiple threads in parallel in order to find multithreading bugs. Some tests pass when run with `--parallel-threads`, but there's still more work before the entire suite passes.
Diffstat (limited to 'Lib/test/test_class.py')
-rw-r--r--Lib/test/test_class.py2
1 files changed, 2 insertions, 0 deletions
diff --git a/Lib/test/test_class.py b/Lib/test/test_class.py
index e20e59944e9..017aca3c828 100644
--- a/Lib/test/test_class.py
+++ b/Lib/test/test_class.py
@@ -1,6 +1,7 @@
"Test the functionality of Python classes implementing operators."
import unittest
+from test import support
from test.support import cpython_only, import_helper, script_helper, skip_emscripten_stack_overflow
testmeths = [
@@ -134,6 +135,7 @@ for method in testmeths:
AllTests = type("AllTests", (object,), d)
del d, statictests, method, method_template
+@support.thread_unsafe("callLst is shared between threads")
class ClassTests(unittest.TestCase):
def setUp(self):
callLst[:] = []