Skip to content

pytest plugin examples #439

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

Merged
merged 10 commits into from
Sep 20, 2022
Merged

pytest plugin examples #439

merged 10 commits into from
Sep 20, 2022

Conversation

tony
Copy link
Member

@tony tony commented Sep 20, 2022

Fixes #438

@tony tony force-pushed the testing-doctest-fixture-examples branch from 3d66aa4 to 87153fd Compare September 20, 2022 02:54
@tony tony force-pushed the testing-doctest-fixture-examples branch from 87153fd to 44950da Compare September 20, 2022 03:06
________________________ ERROR collecting test session _________________________
Defining 'pytest_plugins' in a non-top-level conftest is no longer supported:
It affects the entire test suite instead of just below the conftest as expected.
  /home/runner/work/libtmux/libtmux/src/libtmux/conftest.py
Please move it to a top level conftest file at the rootdir:
  /home/runner/work/libtmux/libtmux
For more information, visit:
  https://docs.pytest.org/en/stable/deprecations.html#pytest-plugins-in-non-top-level-conftest-files
conftest.py: error: Duplicate module named "conftest" (also at "docs/conftest.py")
I still have to run locals().keys() to scope request into the doctest
context, no idea why.
The request context isn't detected inside the doctest unless I run
locals(). The request context is needed to join the example code's
import so the type annotation shows.
@codecov
Copy link

codecov bot commented Sep 20, 2022

Codecov Report

Merging #439 (9e8526b) into master (569dac7) will decrease coverage by 0.03%.
The diff coverage is 100.00%.

❗ Current head 9e8526b differs from pull request most recent head 6628544. Consider uploading reports for the commit 6628544 to get more accurate results

@@            Coverage Diff             @@
##           master     #439      +/-   ##
==========================================
- Coverage   86.34%   86.30%   -0.04%     
==========================================
  Files          22       23       +1     
  Lines        1824     1826       +2     
  Branches      277      277              
==========================================
+ Hits         1575     1576       +1     
- Misses        170      171       +1     
  Partials       79       79              
Impacted Files Coverage Δ
src/libtmux/pytest_plugin.py 78.94% <ø> (ø)
conftest.py 100.00% <100.00%> (ø)
src/libtmux/conftest.py 84.61% <100.00%> (+0.61%) ⬆️
src/libtmux/session.py 74.86% <0.00%> (-0.56%) ⬇️

📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more

@tony tony force-pushed the testing-doctest-fixture-examples branch from 1466057 to 399f3a5 Compare September 20, 2022 03:29
@tony tony force-pushed the testing-doctest-fixture-examples branch from 8ad5ec4 to adbcd0c Compare September 20, 2022 03:36
@tony tony merged commit bd315dd into master Sep 20, 2022
@tony tony deleted the testing-doctest-fixture-examples branch September 20, 2022 03:48
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.

pytest plugin examples
1 participant