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

Test code examples in docs #640

Merged
merged 2 commits into from
Oct 24, 2023

Conversation

seifertm
Copy link
Contributor

Most Python code examples in the docs are now run as unit tests.

Tests that perform network operations or require additional test dependencies like uvloop have been excluded.

Closes #639

This allows for auto-formatting using the usual tools and enables running the code examples as tests to ensure they work.

Tests that perform network operations or require additional test dependencies have been excluded.

Signed-off-by: Michael Seifert <[email protected]>
@codecov-commenter
Copy link

Codecov Report

All modified and coverable lines are covered by tests ✅

Comparison is base (106fa54) 93.28% compared to head (5f3b683) 93.79%.

Additional details and impacted files
@@            Coverage Diff             @@
##             main     #640      +/-   ##
==========================================
+ Coverage   93.28%   93.79%   +0.51%     
==========================================
  Files           2        2              
  Lines         387      387              
  Branches       83       83              
==========================================
+ Hits          361      363       +2     
+ Misses         15       14       -1     
+ Partials       11       10       -1     

see 1 file with indirect coverage changes

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

@seifertm seifertm added this pull request to the merge queue Oct 24, 2023
Merged via the queue into pytest-dev:main with commit b7c66db Oct 24, 2023
8 checks passed
@seifertm seifertm deleted the test-code-examples-in-docs branch October 24, 2023 06:22
@seifertm seifertm restored the test-code-examples-in-docs branch October 24, 2023 10:46
@seifertm seifertm deleted the test-code-examples-in-docs branch April 29, 2024 12:47
@seifertm seifertm restored the test-code-examples-in-docs branch April 29, 2024 12:55
@seifertm seifertm deleted the test-code-examples-in-docs branch April 29, 2024 13:18
@seifertm seifertm restored the test-code-examples-in-docs branch May 19, 2024 12:01
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.

Run code snippets in documentation as tests
2 participants