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

Use pytest-jupyter #1099

Merged
merged 12 commits into from
Nov 28, 2022
Merged

Conversation

blink1073
Copy link
Contributor

@blink1073 blink1073 commented Nov 27, 2022

Use the fixtures from pytest-jupyter and re-expose them in pytest_plugin.py for backward compatibility.

Note, due to a chicken-and-egg problem, we need to forcibly install pytest-jupyter[server] for our downstream tests.

@codecov
Copy link

codecov bot commented Nov 27, 2022

Codecov Report

Base: 85.16% // Head: 79.99% // Decreases project coverage by -5.17% ⚠️

Coverage data is based on head (24bd685) compared to base (3136aac).
Patch coverage: 100.00% of modified lines in pull request are covered.

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #1099      +/-   ##
==========================================
- Coverage   85.16%   79.99%   -5.18%     
==========================================
  Files         124       68      -56     
  Lines       13095     8006    -5089     
  Branches        0     1585    +1585     
==========================================
- Hits        11153     6404    -4749     
+ Misses       1942     1182     -760     
- Partials        0      420     +420     
Impacted Files Coverage Δ
jupyter_server/pytest_plugin.py 92.30% <100.00%> (-1.70%) ⬇️
jupyter_server/auth/logout.py 77.77% <0.00%> (-11.12%) ⬇️
jupyter_server/base/websocket.py 68.11% <0.00%> (-10.15%) ⬇️
jupyter_server/traittypes.py 65.54% <0.00%> (-10.09%) ⬇️
jupyter_server/_version.py 90.00% <0.00%> (-10.00%) ⬇️
jupyter_server/auth/login.py 81.69% <0.00%> (-9.81%) ⬇️
...ter_server/services/kernels/connection/channels.py 59.47% <0.00%> (-9.59%) ⬇️
jupyter_server/extension/utils.py 84.21% <0.00%> (-7.90%) ⬇️
jupyter_server/_sysinfo.py 79.31% <0.00%> (-6.90%) ⬇️
jupyter_server/auth/security.py 75.67% <0.00%> (-6.76%) ⬇️
... and 104 more

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

☔ View full report at Codecov.
📢 Do you have feedback about the report comment? Let us know in this issue.

@blink1073
Copy link
Contributor Author

The coverage was artificially inflated because we weren't using branch coverage with coverage run. This returns us to the more strict coverage reporting.

Copy link
Member

@Zsailer Zsailer left a comment

Choose a reason for hiding this comment

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

You're the man, @blink1073! Great stuff here!

@blink1073 blink1073 merged commit 222e713 into jupyter-server:main Nov 28, 2022
@blink1073 blink1073 deleted the adopt-pytest-jupyter branch November 28, 2022 17:17
@fcollonval
Copy link
Member

@blink1073 do we need to change something in downstream package? This breaks the tests in JupyterLab: https://github.com/jupyterlab/jupyterlab/actions/runs/3572271760/jobs/6005278518

@fcollonval
Copy link
Member

Never mind the trouble comes from the need to explicit the dependency packages otherwise pip is not able to resolve the packages to install. I opened jupyterlab/jupyterlab#13508

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants