mirror of
https://github.com/pre-commit/pre-commit.git
synced 2026-02-17 00:04:42 +04:00
parent
a33773182e
commit
bba6cf4296
2 changed files with 3 additions and 6 deletions
|
|
@ -166,15 +166,13 @@ def test_xargs_concurrency():
|
|||
|
||||
|
||||
def test_thread_mapper_concurrency_uses_threadpoolexecutor_map():
|
||||
# https://github.com/python/mypy/issues/11852
|
||||
with xargs._thread_mapper(10) as thread_map: # type: ignore
|
||||
with xargs._thread_mapper(10) as thread_map:
|
||||
_self = thread_map.__self__ # type: ignore
|
||||
assert isinstance(_self, concurrent.futures.ThreadPoolExecutor)
|
||||
|
||||
|
||||
def test_thread_mapper_concurrency_uses_regular_map():
|
||||
# https://github.com/python/mypy/issues/11852
|
||||
with xargs._thread_mapper(1) as thread_map: # type: ignore
|
||||
with xargs._thread_mapper(1) as thread_map:
|
||||
assert thread_map is map
|
||||
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue