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

Restore pytest plugin from pytest-jupyter #360

Merged
merged 1 commit into from
Dec 10, 2020

Conversation

kevin-bates
Copy link
Member

In today's Jupyter Server meeting, we discussed deprecating the pytest-jupyter library and moving (back) to a native pytest_plugin in this package (how we originally had it).

The pytest-jupyter library introduced extra complexity, requiring us to coordinate releases of pytest-jupyter and jupyter_server anytime there was a change in jupyter_server.

Here, the pytest_plugin is a submodule in jupyter_server. To use this plugin in a given test suite, add jupyter_server.pytest_plugin to the pytest_plugin list of the root conftest.py file, e.g.:

# conftest.py file
pytest_plugin = [
    "jupyter_server.pytest_plugin",
    ...
]

This PR includes some fixtures that we should eventually move to the jupyter_core package as a jupyter_core.pytest_plugin module. We can do this at a later time. Jupyter Server can remove those fixtures and depend on jupyter_core's plugin without changing API or disrupting downstream projects.

@codecov-io
Copy link

codecov-io commented Dec 10, 2020

Codecov Report

Merging #360 (1858bb5) into master (ca492c1) will increase coverage by 0.85%.
The diff coverage is 93.12%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master     #360      +/-   ##
==========================================
+ Coverage   67.37%   68.23%   +0.85%     
==========================================
  Files          55       56       +1     
  Lines        5361     5550     +189     
  Branches      696      705       +9     
==========================================
+ Hits         3612     3787     +175     
- Misses       1545     1556      +11     
- Partials      204      207       +3     
Impacted Files Coverage Δ
jupyter_server/pytest_plugin.py 93.12% <93.12%> (ø)
jupyter_server/serverapp.py 62.00% <0.00%> (-0.13%) ⬇️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update ca492c1...1858bb5. Read the comment docs.

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.

LGTM!

@Zsailer Zsailer merged commit 28f784b into jupyter-server:master Dec 10, 2020
@kevin-bates kevin-bates deleted the restore-pytest-plugin branch January 14, 2021 15:52
hMED22 pushed a commit to hMED22/jupyter_server that referenced this pull request Jan 23, 2023
…-plugin

Restore pytest plugin from pytest-jupyter
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

3 participants