File tree Expand file tree Collapse file tree 2 files changed +4
-1
lines changed
Expand file tree Collapse file tree 2 files changed +4
-1
lines changed Original file line number Diff line number Diff line change @@ -172,7 +172,8 @@ def pytest_itemcollected(item):
172172 skipped_functions = [
173173 x .split ("." ) for x in item .config .getini ("thread_unsafe_functions" )
174174 ]
175- skipped_functions = {("." .join (x [:- 1 ]), x [- 1 ]) for x in skipped_functions }
175+ skipped_functions = frozenset (("." .join (x [:- 1 ]), x [- 1 ]) for x in
176+ skipped_functions )
176177
177178 if n_workers > 1 :
178179 thread_unsafe , thread_unsafe_reason = identify_thread_unsafe_nodes (
Original file line number Diff line number Diff line change 11import ast
2+ import functools
23import inspect
34import threading
45import types
@@ -116,6 +117,7 @@ def visit_Assign(self, node):
116117 self .generic_visit (node )
117118
118119
120+ @functools .lru_cache
119121def identify_thread_unsafe_nodes (fn , skip_set , level = 0 ):
120122 if is_hypothesis_test (fn ):
121123 return True , "uses hypothesis"
You can’t perform that action at this time.
0 commit comments