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

pytest: package conftest #576

Merged
merged 1 commit into from
Aug 24, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/integration-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -44,4 +44,4 @@ jobs:
pip check
- name: Run the tests
run: |
pytest -vv --integration_tests=true
pytest -vv --integration_tests=true jupyter_server
6 changes: 3 additions & 3 deletions .github/workflows/python-linux.yml
Original file line number Diff line number Diff line change
Expand Up @@ -69,17 +69,17 @@ jobs:
- name: Run the tests
if: ${{ matrix.python-version != 'pypy3' }}
run: |
pytest -vv --cov jupyter_server --cov-branch --cov-report term-missing:skip-covered
pytest -vv jupyter_server --cov jupyter_server --cov-branch --cov-report term-missing:skip-covered
- name: Run the tests on pypy
if: ${{ matrix.python-version == 'pypy3' }}
run: |
pytest -vv
pytest -vv jupyter_server
- name: Install the Python dependencies for the examples
run: |
cd examples/simple && pip install -e .
- name: Run the tests for the examples
run: |
pytest examples/simple/tests/test_handlers.py --confcutdir=$PWD
pytest examples/simple
- name: Coverage
if: ${{ matrix.python-version != 'pypy3' }}
run: |
Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/python-macos.yml
Original file line number Diff line number Diff line change
Expand Up @@ -45,17 +45,17 @@ jobs:
- name: Run the tests
if: ${{ matrix.python-version != 'pypy3' }}
run: |
pytest -vv --cov jupyter_server --cov-branch --cov-report term-missing:skip-covered
pytest -vv jupyter_server --cov jupyter_server --cov-branch --cov-report term-missing:skip-covered
- name: Run the tests on pypy
if: ${{ matrix.python-version == 'pypy3' }}
run: |
pytest -vv
pytest -vv jupyter_server
- name: Install the Python dependencies for the examples
run: |
cd examples/simple && pip install -e .
- name: Run the tests for the examples
run: |
pytest examples/simple/tests/test_handlers.py --confcutdir=$PWD
pytest examples/simple
- name: Coverage
if: ${{ matrix.python-version != 'pypy3' }}
run: |
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/python-windows.yml
Original file line number Diff line number Diff line change
Expand Up @@ -49,10 +49,10 @@ jobs:
# the file descriptions opened by the asyncio IOLoop.
# This leads to a nasty, flaky race condition that we haven't
# been able to solve.
pytest -vv -s
pytest -vv -s jupyter_server
- name: Install the Python dependencies for the examples
run: |
cd examples/simple && pip install -e .
- name: Run the tests for the examples
run: |
pytest examples/simple/tests/test_handlers.py --confcutdir=$PWD
pytest examples/simple
6 changes: 3 additions & 3 deletions CONTRIBUTING.rst
Original file line number Diff line number Diff line change
Expand Up @@ -85,12 +85,12 @@ Running Tests
Install dependencies::

pip install -e .[test]
pip install -e examples/simple
pip install -e examples/simple # to test the examples

To run the Python tests, use::

pytest
pytest examples/simple --confcutdir=$PWD
pytest jupyter_server
pytest examples/simple # to test the examples

Building the Docs
=================
Expand Down
1 change: 1 addition & 0 deletions examples/simple/conftest.py
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
from jupyter_server.conftest import *
File renamed without changes.
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ ignore = ["tbump.toml", ".*", "*.yml", "package-lock.json", "bootstrap*", "conft
[tool.pytest.ini_options]
addopts = "--doctest-modules"
testpaths = [
"jupyter_server"
"jupyter_server/"
]

[tool.jupyter-releaser]
Expand Down