diff --git a/pytest_trio/_tests/conftest.py b/pytest_trio/_tests/conftest.py index 7e1ccd9..c6481d5 100644 --- a/pytest_trio/_tests/conftest.py +++ b/pytest_trio/_tests/conftest.py @@ -1,11 +1 @@ -# Temporary hack while waiting for an answer here: -# https://github.com/pytest-dev/pytest/issues/4039 -import pytest -import warnings -warnings.filterwarnings( - "default", - category=pytest.RemovedInPytest4Warning, - message=".*non-top-level conftest.*", -) - pytest_plugins = ["pytester"] diff --git a/pytest_trio/_tests/test_trio_asyncio.py b/pytest_trio/_tests/test_trio_asyncio.py index 8a3d9d0..0b00a97 100644 --- a/pytest_trio/_tests/test_trio_asyncio.py +++ b/pytest_trio/_tests/test_trio_asyncio.py @@ -3,10 +3,18 @@ import asyncio from async_generator import async_generator, yield_ +pytestmark = [] + try: import trio_asyncio except ImportError: - pytestmark = pytest.mark.skip(reason="trio-asyncio not available") + pytestmark.append(pytest.mark.skip(reason="trio-asyncio not available")) + +# https://github.com/python-trio/trio-asyncio/issues/61 +pytestmark.append( + pytest.mark. + filterwarnings("ignore:trio.Event.clear.*:trio.TrioDeprecationWarning") +) async def use_asyncio():