Skip to content
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