We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
_testcapi
test_free_threading
1 parent eee2c45 commit f2a4540Copy full SHA for f2a4540
Lib/test/test_free_threading/test_dict.py
@@ -8,7 +8,10 @@
8
from threading import Thread
9
from unittest import TestCase
10
11
-from _testcapi import dict_version
+try:
12
+ import _testcapi
13
+except ImportError:
14
+ _testcapi = None
15
16
from test.support import threading_helper
17
@@ -139,7 +142,9 @@ def writer_func(l):
139
142
for ref in thread_list:
140
143
self.assertIsNone(ref())
141
144
145
+ @unittest.skipIf(_testcapi is None, 'need _testcapi module')
146
def test_dict_version(self):
147
+ dict_version = _testcapi.dict_version
148
THREAD_COUNT = 10
149
DICT_COUNT = 10000
150
lists = []
0 commit comments