Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove RemovedInPytest4Warning resolved in latest pytest #91

Closed
wants to merge 2 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 0 additions & 10 deletions pytest_trio/_tests/conftest.py
Original file line number Diff line number Diff line change
@@ -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"]
10 changes: 9 additions & 1 deletion pytest_trio/_tests/test_trio_asyncio.py
Original file line number Diff line number Diff line change
Expand Up @@ -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():
Expand Down