@@ -30,7 +30,7 @@ def test_racing_heapify(self):
3030 shuffle (heap )
3131
3232 run_concurrently (
33- worker_func = heapq .heapify , args = (heap ,), nthreads = NTHREADS
33+ worker_func = heapq .heapify , nthreads = NTHREADS , args = (heap ,)
3434 )
3535 self .test_heapq .check_invariant (heap )
3636
@@ -42,7 +42,7 @@ def heappush_func(heap):
4242 heapq .heappush (heap , item )
4343
4444 run_concurrently (
45- worker_func = heappush_func , args = (heap ,), nthreads = NTHREADS
45+ worker_func = heappush_func , nthreads = NTHREADS , args = (heap ,)
4646 )
4747 self .test_heapq .check_invariant (heap )
4848
@@ -64,8 +64,8 @@ def heappop_func(heap, pop_count):
6464
6565 run_concurrently (
6666 worker_func = heappop_func ,
67- args = (heap , per_thread_pop_count ),
6867 nthreads = NTHREADS ,
68+ args = (heap , per_thread_pop_count ),
6969 )
7070 self .assertEqual (len (heap ), 0 )
7171
@@ -80,8 +80,8 @@ def heappushpop_func(heap, pushpop_items):
8080
8181 run_concurrently (
8282 worker_func = heappushpop_func ,
83- args = (heap , pushpop_items ),
8483 nthreads = NTHREADS ,
84+ args = (heap , pushpop_items ),
8585 )
8686 self .assertEqual (len (heap ), OBJECT_COUNT )
8787 self .test_heapq .check_invariant (heap )
@@ -96,8 +96,8 @@ def heapreplace_func(heap, replace_items):
9696
9797 run_concurrently (
9898 worker_func = heapreplace_func ,
99- args = (heap , replace_items ),
10099 nthreads = NTHREADS ,
100+ args = (heap , replace_items ),
101101 )
102102 self .assertEqual (len (heap ), OBJECT_COUNT )
103103 self .test_heapq .check_invariant (heap )
@@ -107,7 +107,7 @@ def test_racing_heapify_max(self):
107107 shuffle (max_heap )
108108
109109 run_concurrently (
110- worker_func = heapq .heapify_max , args = (max_heap ,), nthreads = NTHREADS
110+ worker_func = heapq .heapify_max , nthreads = NTHREADS , args = (max_heap ,)
111111 )
112112 self .test_heapq .check_max_invariant (max_heap )
113113
@@ -119,7 +119,7 @@ def heappush_max_func(max_heap):
119119 heapq .heappush_max (max_heap , item )
120120
121121 run_concurrently (
122- worker_func = heappush_max_func , args = (max_heap ,), nthreads = NTHREADS
122+ worker_func = heappush_max_func , nthreads = NTHREADS , args = (max_heap ,)
123123 )
124124 self .test_heapq .check_max_invariant (max_heap )
125125
@@ -141,8 +141,8 @@ def heappop_max_func(max_heap, pop_count):
141141
142142 run_concurrently (
143143 worker_func = heappop_max_func ,
144- args = (max_heap , per_thread_pop_count ),
145144 nthreads = NTHREADS ,
145+ args = (max_heap , per_thread_pop_count ),
146146 )
147147 self .assertEqual (len (max_heap ), 0 )
148148
@@ -157,8 +157,8 @@ def heappushpop_max_func(max_heap, pushpop_items):
157157
158158 run_concurrently (
159159 worker_func = heappushpop_max_func ,
160- args = (max_heap , pushpop_items ),
161160 nthreads = NTHREADS ,
161+ args = (max_heap , pushpop_items ),
162162 )
163163 self .assertEqual (len (max_heap ), OBJECT_COUNT )
164164 self .test_heapq .check_max_invariant (max_heap )
@@ -173,8 +173,8 @@ def heapreplace_max_func(max_heap, replace_items):
173173
174174 run_concurrently (
175175 worker_func = heapreplace_max_func ,
176- args = (max_heap , replace_items ),
177176 nthreads = NTHREADS ,
177+ args = (max_heap , replace_items ),
178178 )
179179 self .assertEqual (len (max_heap ), OBJECT_COUNT )
180180 self .test_heapq .check_max_invariant (max_heap )
@@ -204,7 +204,7 @@ def worker():
204204 except IndexError :
205205 pass
206206
207- run_concurrently (worker , (), n_threads * 2 )
207+ run_concurrently (worker , n_threads * 2 )
208208
209209 @staticmethod
210210 def is_sorted_ascending (lst ):
0 commit comments