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

replace pytest-asyncio and pytest-trio with anyio #2512

Merged
merged 7 commits into from Jan 2, 2023

Conversation

graingert
Copy link
Member

@@ -152,7 +152,7 @@ async def async_auth_flow(
yield request


@pytest.mark.asyncio
@pytest.mark.anyio
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

is there a reason these were not marked @pytest.mark.usefixtures("async_environment") ?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ah some of these tests used asyncio.Lock so only worked on asyncio. I changed it to anyio.Lock and they pass on trio or asyncio now

@michaeloliverx
Copy link
Member

One less dependency gets my vote :)

@Kludex
Copy link
Sponsor Member

Kludex commented Dec 20, 2022

As a note, because @tomchristie mentioned before on Starlette that was not necessary, using pytest.mark.anyio without defining a anyio_backend fixture will run every test with both asyncio and trio.

I'm just mentioning, I'm not expressing my opinion. JFYK

@graingert
Copy link
Member Author

@graingert graingert marked this pull request as ready for review December 22, 2022 12:30
@graingert graingert changed the title replace pytest-asyncio with anyio replace pytest-asyncio and pytest-trio with anyio Dec 22, 2022
@@ -18,7 +18,7 @@ combine_as_imports = True
addopts = -rxXs
filterwarnings =
error
asyncio_mode = strict
ignore: You seem to already have a custom sys.excepthook handler installed. I'll skip installing Trio's custom handler, but this means MultiErrors will not show full tracebacks.:RuntimeWarning
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What's causing this warning, and when can we expect to be able to remove this filter?

@tomchristie tomchristie merged commit e27d1b8 into encode:master Jan 2, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants