diff options
author | David Lechner <david@lechnology.com> | 2020-03-22 21:26:08 -0500 |
---|---|---|
committer | Damien George <damien.p.george@gmail.com> | 2020-03-30 13:21:58 +1100 |
commit | 3dc324d3f1312e40d3a8ed87e7244966bb756f26 (patch) | |
tree | 94ff44f8eabba0039582c245b901173597edd11e /tests/thread/stress_heap.py | |
parent | 488613bca6c460340ed2995ae5cafafe22d0bfff (diff) |
tests: Format all Python code with black, except tests in basics subdir.
This adds the Python files in the tests/ directory to be formatted with
./tools/codeformat.py. The basics/ subdirectory is excluded for now so we
aren't changing too much at once.
In a few places `# fmt: off`/`# fmt: on` was used where the code had
special formatting for readability or where the test was actually testing
the specific formatting.
Diffstat (limited to 'tests/thread/stress_heap.py')
-rw-r--r-- | tests/thread/stress_heap.py | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/tests/thread/stress_heap.py b/tests/thread/stress_heap.py index 5482a9ac6..2ad91ae14 100644 --- a/tests/thread/stress_heap.py +++ b/tests/thread/stress_heap.py @@ -9,9 +9,11 @@ except ImportError: import time import _thread + def last(l): return l[-1] + def thread_entry(n): # allocate a bytearray and fill it data = bytearray(i for i in range(256)) @@ -33,6 +35,7 @@ def thread_entry(n): global n_finished n_finished += 1 + lock = _thread.allocate_lock() n_thread = 10 n_finished = 0 |