diff --git a/setup.py b/setup.py index 8c074a24..8d80b08e 100644 --- a/setup.py +++ b/setup.py @@ -40,13 +40,13 @@ def find_version(): "Framework :: Pytest", ], python_requires=">= 3.5", - install_requires=["pytest >= 3.6.0"], + install_requires=["pytest >= 3.6.0, < 5.4.0"], extras_require={ ':python_version == "3.5"': "async_generator >= 1.3", "testing": [ "coverage", "async_generator >= 1.3", - "hypothesis >= 3.64", + "hypothesis >= 5.7.1", ], }, entry_points={"pytest11": ["asyncio = pytest_asyncio.plugin"]}, diff --git a/tests/test_hypothesis_integration.py b/tests/test_hypothesis_integration.py index 63c6cc74..b4e62a0e 100644 --- a/tests/test_hypothesis_integration.py +++ b/tests/test_hypothesis_integration.py @@ -8,6 +8,12 @@ from hypothesis import given, strategies as st +@pytest.fixture(scope="module") +def event_loop(): + loop = asyncio.get_event_loop() + yield loop + + @given(st.integers()) @pytest.mark.asyncio async def test_mark_inner(n): diff --git a/tests/test_subprocess.py b/tests/test_subprocess.py index 3f3fa090..83490e82 100644 --- a/tests/test_subprocess.py +++ b/tests/test_subprocess.py @@ -6,6 +6,17 @@ import pytest +if sys.platform == 'win32': + # The default asyncio event loop implementation on Windows does not + # support subprocesses. Subprocesses are available for Windows if a + # ProactorEventLoop is used. + @pytest.yield_fixture() + def event_loop(): + loop = asyncio.ProactorEventLoop() + yield loop + loop.close() + + @pytest.mark.asyncio(forbid_global_loop=False) async def test_subprocess(event_loop): """Starting a subprocess should be possible."""