Skip to content

Commit

Permalink
fix: windows is a special case
Browse files Browse the repository at this point in the history
  • Loading branch information
Michael Kryukov committed Aug 4, 2023
1 parent f738071 commit f42dfd0
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion tests/test_basic.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
from sys import platform
import asyncio

import pytest
Expand Down Expand Up @@ -33,7 +34,12 @@ async def test_asyncio_executor_sleeps():

@pytest.mark.parametrize('cls', [BoundedThreadPoolExecutor, BoundedProcessPoolExecutor])
def test_sync_executor_sleeps(cls):
with assert_takes(less=1.5):
if platform == 'win32':
expected_elapsed_max = 1.85
else:
expected_elapsed_max = 1.5

with assert_takes(less=expected_elapsed_max):
with cls(2) as pool:
with assert_takes(less=0.5):
for _ in range(2):
Expand Down

0 comments on commit f42dfd0

Please sign in to comment.