Skip to content

Commit 75884cb

Browse files
committed
cleanup
1 parent acd0ad1 commit 75884cb

1 file changed

Lines changed: 5 additions & 3 deletions

File tree

Lib/test/test_free_threading/test_json.py

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ def items(self):
2929
@threading_helper.reap_threads
3030
@threading_helper.requires_working_threading()
3131
class TestJsonEncoding(CTest):
32-
# Test encoding json with multiple threads modifying the data cannot
32+
# Test encoding json with concurrent threads modifying the data cannot
3333
# corrupt the interpreter
3434

3535
def test_json_mutating_list(self):
@@ -59,6 +59,7 @@ def worker(barrier, data, index):
5959
pass
6060
else:
6161
d[index] = index
62+
6263
encode_json_helper(self.json, worker, [{}, {}], number_of_threads=16)
6364

6465
def test_json_mutating_mapping(self):
@@ -71,8 +72,9 @@ def worker(barrier, data, index):
7172
d.mapping.clear()
7273
else:
7374
d.mapping.append((index, index))
74-
encode_json_helper(self.json,
75-
worker, [MyMapping(), MyMapping()], number_of_threads=16)
75+
76+
data = [MyMapping(), MyMapping()]
77+
encode_json_helper(self.json, worker, data, number_of_threads=16)
7678

7779

7880
if __name__ == "__main__":

0 commit comments

Comments
 (0)