Skip to content
New issue

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

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

Already on GitHub? # to your account

docs: specify how asyncio's mode can be set #1043

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

JP-Ellis
Copy link

When reading the docs, it wasn't clear to me how to set asyncio's mode and I had to rely on looking at the source code. I thought it would be nice to expand the docs to be more explicit in this regard.

When reading the docs, it wasn't clear to me how to set asyncio's mode
and I had to rely on looking at the source code (or scouring `pytest
--help`). I thought it would be nice to expand the docs to be more
explicit in this regard.

Signed-off-by: JP-Ellis <josh@jpellis.me>
@JP-Ellis JP-Ellis force-pushed the docs/how-to-set-mode branch from 7730ef8 to e74a399 Compare January 14, 2025 06:37
@codecov-commenter
Copy link

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 91.13%. Comparing base (2188cdb) to head (e74a399).

Additional details and impacted files
@@           Coverage Diff           @@
##             main    #1043   +/-   ##
=======================================
  Coverage   91.13%   91.13%           
=======================================
  Files           2        2           
  Lines         564      564           
  Branches       74       74           
=======================================
  Hits          514      514           
  Misses         30       30           
  Partials       20       20           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

Copy link
Contributor

@asvetlov asvetlov left a comment

Choose a reason for hiding this comment

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

lgtm

@seifertm
Copy link
Contributor

seifertm commented Jan 15, 2025

When reading the docs, it wasn't clear to me how to set asyncio's mode and I had to rely on looking at the source code. I thought it would be nice to expand the docs to be more explicit in this regard.

That's a good point, thanks for raising it! I can relate to the problem.

The pytest-asyncio documentation roughly follows the Diataxis approach at the moment.
The Concepts section (called Explanation in Diataxis) is only concerned with providing information to understand pytest-asyncio, not necessarily how to use it. There's also a configuration reference for asyncio_mode which should contain all relevant information.

@JP-Ellis Personally, I would prefer if you:

  • Link to the asyncio_mode reference from concepts.rst (adjusting the reference as needed)
  • and/or create a new "How to configure asyncio_mode" in the how-tos.

# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants