-
Notifications
You must be signed in to change notification settings - Fork 313
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
Cannot run tests when installed from PyPI #563
Comments
The required pytest plugin is now defined in a top-level contest file: Lines 4 to 6 in 52e9467
Due to a deprecation in pytest which requires plugins to be defined in a top-level conftest file: https://docs.pytest.org/en/6.2.x/deprecations.html#pytest-plugins-in-non-top-level-conftest-files
|
My suggestion is that we move the The only downside, of course, is that the tests will raise an error when run from source using just I don't think we should move the examples folder into the package—this would make the examples less discoverable. They are really only useful for people looking at the source code in the Github repo. If they aren't at the top level, I don't think anyone will see them. |
closes jupyter-server#563 * Add `jupyter_server` to the default pytest args to allow running `pytest` with no arguments. * Import the `jupyter_server.conftest` in the examples to inherit the plugin.
closes jupyter-server#563 * Package the conftest file. * This changes the test command to `pytest jupyter_server`. * Import the `jupyter_server.conftest` in the examples to inherit the plugin.
closes #563 * Package the conftest file. * This changes the test command to `pytest jupyter_server`. * Import the `jupyter_server.conftest` in the examples to inherit the plugin.
Description
pip install jupyter_server[test]
doesn't allow to run the tests.Reproduce
mamba create -n jupyter_server jupyter_server
conda activate jupyter_server
pytest --pyargs jupyter_server
conftest.py
is at the root of the repository and is not included in the package.Expected behavior
The tests are part of the package, so we should be able to run them.
Context
The text was updated successfully, but these errors were encountered: