From 75f1a0dc79a1a40b8e9d22cfb925542cc4d8a446 Mon Sep 17 00:00:00 2001 From: Chris Ostrouchov Date: Fri, 28 Feb 2020 14:11:46 -0500 Subject: [PATCH 1/2] Remove RemovedInPytest4Warning resolved in latest pytest Resolved with issues: https://github.com/pytest-dev/pytest/issues/4039 --- pytest_trio/_tests/conftest.py | 10 ---------- 1 file changed, 10 deletions(-) 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"] From 5d2612b97ba689d0f1473617b9278a275ecaa8e3 Mon Sep 17 00:00:00 2001 From: Quentin Pradet Date: Sun, 1 Mar 2020 09:27:12 +0400 Subject: [PATCH 2/2] Ignore trio.Event.clear deprecation warning --- pytest_trio/_tests/test_trio_asyncio.py | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) 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():