Skip to content

Commit 84d569b

Browse files
authored
Clean up handling of tests (#700)
1 parent 62607ce commit 84d569b

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

79 files changed

+104
-100
lines changed

.github/workflows/integration-tests.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,4 +27,4 @@ jobs:
2727
pip check
2828
- name: Run the tests
2929
run: |
30-
pytest -vv --integration_tests=true jupyter_server
30+
pytest -vv --integration_tests=true tests

.github/workflows/python-linux.yml

Lines changed: 11 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -51,11 +51,11 @@ jobs:
5151
- name: Run the tests
5252
if: ${{ matrix.python-version != 'pypy-3.7' }}
5353
run: |
54-
pytest -vv jupyter_server --cov jupyter_server --cov-branch --cov-report term-missing:skip-covered
54+
pytest -vv --cov jupyter_server --cov-branch --cov-report term-missing:skip-covered
5555
- name: Run the tests on pypy
5656
if: ${{ matrix.python-version == 'pypy-3.7' }}
5757
run: |
58-
pytest -vv jupyter_server
58+
pytest -vv
5959
- name: Install the Python dependencies for the examples
6060
run: |
6161
cd examples/simple && pip install -e .
@@ -99,7 +99,14 @@ jobs:
9999
uses: actions/download-artifact@v2
100100
- name: Install From SDist
101101
run: |
102-
pip install --find-links=./sdist "jupyter_server[test]>=0.0.dev0"
102+
set -ex
103+
cd sdist
104+
mkdir test
105+
tar --strip-components=1 -zxvf jupyter_server* -C ./test
106+
cd test
107+
pip install -e .[test]
103108
pip install pytest-github-actions-annotate-failures
104109
- name: Run Test
105-
run: pytest -vv --pyargs --timeout=300 --timeout_method=thread jupyter_server --capture=no
110+
run: |
111+
cd sdist/test
112+
pytest -vv

.github/workflows/python-macos.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -28,11 +28,11 @@ jobs:
2828
- name: Run the tests
2929
if: ${{ !startsWith( matrix.python-version, 'pypy' ) }}
3030
run: |
31-
pytest -vv jupyter_server --cov jupyter_server --cov-branch --cov-report term-missing:skip-covered
31+
pytest -vv --cov jupyter_server --cov-branch --cov-report term-missing:skip-covered
3232
- name: Run the tests on pypy
3333
if: ${{ startsWith( matrix.python-version, 'pypy' ) }}
3434
run: |
35-
pytest -vv jupyter_server
35+
pytest -vv
3636
- name: Install the Python dependencies for the examples
3737
run: |
3838
cd examples/simple && pip install -e .

.github/workflows/python-windows.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ jobs:
3232
# the file descriptions opened by the asyncio IOLoop.
3333
# This leads to a nasty, flaky race condition that we haven't
3434
# been able to solve.
35-
pytest -vv -s jupyter_server
35+
pytest -vv -s
3636
- name: Install the Python dependencies for the examples
3737
run: |
3838
cd examples/simple && pip install -e .

CONTRIBUTING.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -89,7 +89,7 @@ Install dependencies::
8989

9090
To run the Python tests, use::
9191

92-
pytest jupyter_server
92+
pytest
9393
pytest examples/simple # to test the examples
9494

9595
Building the Docs

MANIFEST.in

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,11 +3,11 @@ include CONTRIBUTING.rst
33
include README.md
44
include RELEASE.md
55
include CHANGELOG.md
6-
include setupbase.py
76
include package.json
87

98
# include everything in package_data
109
recursive-include jupyter_server *
10+
recursive-include tests *
1111

1212
# Documentation
1313
graft docs

examples/simple/conftest.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
from jupyter_server.conftest import * # noqa
1+
pytest_plugins = ["jupyter_server.pytest_plugin"]

jupyter_server/conftest.py

Lines changed: 0 additions & 31 deletions
This file was deleted.

pyproject.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ ignore = ["tbump.toml", ".*", "*.yml", "package-lock.json", "bootstrap*", "conft
1111
[tool.pytest.ini_options]
1212
addopts = "--doctest-modules"
1313
testpaths = [
14-
"jupyter_server/"
14+
"tests/"
1515
]
1616
timeout = 300
1717
timeout_method = "thread"

setup.cfg

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,11 @@ console_scripts =
6464
jupyter-server = jupyter_server.serverapp:main
6565

6666
[options.packages.find]
67-
exclude = ['docs*', 'examples*']
67+
exclude =
68+
docs.*
69+
examples.*
70+
tests
71+
tests.*
6872

6973
[flake8]
7074
ignore = E, C, W, F403, F811, F841, E402, I100, I101, D400

0 commit comments

Comments
 (0)