Skip to content
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Reduce test
  • Loading branch information
corona10 committed Mar 16, 2024
commit fa2ad85d318c23fe2956d2729d1790a29d54c311
6 changes: 1 addition & 5 deletions Lib/test/libregrtest/tsan.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,9 @@
# chosen because they use threads and run in a reasonable amount of time.

TSAN_TESTS = [
'test_asyncio',
'test_capi',
'test_code',
'test_compileall',
Comment thread
corona10 marked this conversation as resolved.
Outdated
'test_concurrent_futures',
'test_enum',
'test_functools',
'test_fork1',
Comment thread
corona10 marked this conversation as resolved.
Outdated
Expand All @@ -15,8 +13,6 @@
'test_importlib',
'test_io',
'test_logging',
'test_multiprocessing_forkserver',
'test_multiprocessing_spawn',
'test_pickle',
Comment thread
corona10 marked this conversation as resolved.
Outdated
'test_queue',

@corona10 corona10 Mar 16, 2024 •

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

def queue_join_test(self, q):

'test_smtpnet',
Expand All @@ -28,7 +24,7 @@
'test_threading',
'test_threading_local',
'test_threadsignals',
'test_urlib2net',
'test_urllib2net',
'test_weakref',

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@threading_helper.requires_working_threading()
def test_threaded_weak_valued_setdefault(self):
d = weakref.WeakValueDictionary()
with collect_in_thread():
for i in range(100000):
x = d.setdefault(10, RefCycle())
self.assertIsNot(x, None) # we never put None in there!
del x
@threading_helper.requires_working_threading()
def test_threaded_weak_valued_pop(self):
d = weakref.WeakValueDictionary()
with collect_in_thread():
for i in range(100000):
d[10] = RefCycle()
x = d.pop(10, 10)
self.assertIsNot(x, None) # we never put None in there!
@threading_helper.requires_working_threading()
def test_threaded_weak_valued_consistency(self):
# Issue #28427: old keys should not remove new values from
# WeakValueDictionary when collecting from another thread.
d = weakref.WeakValueDictionary()
with collect_in_thread():
for i in range(200000):
o = RefCycle()
d[10] = o
# o is still alive, so the dict can't be empty
self.assertEqual(len(d), 1)
o = None # lose ref

]

Expand Down