Skip to content
This repository has been archived by the owner on Oct 13, 2023. It is now read-only.

Commit

Permalink
Fix unit test warning
Browse files Browse the repository at this point in the history
  • Loading branch information
locriandev committed Nov 23, 2022
1 parent 78c7a2b commit 3f17335
Showing 1 changed file with 7 additions and 7 deletions.
14 changes: 7 additions & 7 deletions tests/test_pushd.py
Expand Up @@ -37,13 +37,13 @@ def test_getcwd_threads(self):
Execute the concurrency test for 10 threads
"""
thread_count = 10
pool = Pool(thread_count)
results = [
pool.apply_async(lambda: self.test_getcwd(concurrent=True))
for _ in range(thread_count)
]
for result in results:
result.get()
with Pool(thread_count) as pool:
results = [
pool.apply_async(lambda: self.test_getcwd(concurrent=True))
for _ in range(thread_count)
]
for result in results:
result.get()


if __name__ == "__main__":
Expand Down

0 comments on commit 3f17335

Please sign in to comment.