File tree Expand file tree Collapse file tree 2 files changed +19
-0
lines changed
Expand file tree Collapse file tree 2 files changed +19
-0
lines changed Original file line number Diff line number Diff line change @@ -111,6 +111,8 @@ def visit_Assign(self, node):
111111 f"calls thread-unsafe function: f{ name_node } "
112112 "(inferred via func.__thread_safe__ == False)"
113113 )
114+ else :
115+ self .generic_visit (node )
114116
115117
116118def identify_thread_unsafe_nodes (fn , skip_set , level = 0 ):
Original file line number Diff line number Diff line change @@ -1054,3 +1054,20 @@ def test_parallel_2(num_parallel_threads):
10541054 "*All tests were run in parallel! 🎉*" ,
10551055 ]
10561056 )
1057+
1058+
1059+ def test_recurse_assign (pytester ):
1060+ pytester .makepyfile ("""
1061+ import pytest
1062+
1063+ def test_function_recurse_on_assign(num_parallel_threads):
1064+ w = pytest.warns(UserWarning)
1065+ assert num_parallel_threads == 1
1066+ """ )
1067+
1068+ result = pytester .runpytest ("--parallel-threads=10" , "-v" )
1069+ result .stdout .fnmatch_lines (
1070+ [
1071+ "*::test_function_recurse_on_assign PASSED*" ,
1072+ ]
1073+ )
You can’t perform that action at this time.
0 commit comments