Skip to content

Commit 6c88b31

Browse files
authored
Replace old nose tests with pytest based tests (#152)
* separate eventloop init/start from webapp init/start * allow_none in ssl options * add docstrings and protect the http_server property * replace old nose tests with pytest tests * remove old tests location * Reapply test changes from PR 139 to fix gateway test * decode json models on 3.5 * workaround tornado py38 compatibility issue * use fixture for asyncio * try with new_httpserver=True * reset new httpserver=False * pin nbconvert * add fixture for tornado io_loop * trigger build * polish the windows 3.8 fix and handle nbconvert encoding properly * try extending request timeout * make patch dependent on platform * increase request timeout in ws * increase connection time: * Address deprecation warnings in gateway tests * add sleep before connecting to running kernel * missing kernel shutdown in serverapp * temporarily remove other kernel tests * check that patch is applied in windoes 3.8 * stop using static method * increase connection time * update to versions of python appveyor * add old tests back in * add conda line back to appveyor * add python 38 * Pull ipykernel from GH to fix Windows tests on 3.8 * pull ipykernel master to fix Windows 3.8 issue
1 parent fac5035 commit 6c88b31

Some content is hidden

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

71 files changed

+3945
-4395
lines changed

.github/workflows/main.yml

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
name: CI
1+
name: Jupyter Server Tests
22
on:
33
push:
44
branches:
@@ -24,6 +24,10 @@ jobs:
2424
- name: Install the Python dependencies
2525
run: |
2626
pip install -e .[test]
27+
- name: ipykernel fix on windows 3.8
28+
if: matrix.os == 'windows-latest' && matrix.python-version == '3.8'
29+
run: |
30+
pip install --upgrade git+https://github.com/ipython/ipykernel.git
2731
- name: Run the tests
2832
run: |
29-
nosetests -v jupyter_server
33+
pytest

.travis.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ script:
3737
else
3838
true
3939
fi
40-
- 'if [[ $GROUP == python ]]; then nosetests -v jupyter_server; fi'
40+
- 'if [[ $GROUP == python ]]; then pytest; fi'
4141
- |
4242
if [[ $GROUP == docs ]]; then
4343
EXIT_STATUS=0

appveyor.yml

Lines changed: 17 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -5,13 +5,18 @@ matrix:
55
environment:
66
matrix:
77
- CONDA_PY: 35
8-
CONDA_INSTALL_LOCN: "C:\\Miniconda36-x64"
8+
CONDA_PY_SPEC: 3.5
9+
CONDA_INSTALL_LOCN: "C:\\Miniconda35-x64"
910
- CONDA_PY: 36
11+
CONDA_PY_SPEC: 3.6
1012
CONDA_INSTALL_LOCN: "C:\\Miniconda36-x64"
1113
- CONDA_PY: 37
12-
CONDA_INSTALL_LOCN: "C:\\Miniconda36-x64"
14+
CONDA_PY_SPEC: 3.7
15+
CONDA_INSTALL_LOCN: "C:\\Miniconda37-x64"
1316
- CONDA_PY: 38
14-
CONDA_INSTALL_LOCN: "C:\\Miniconda36-x64"
17+
CONDA_PY_SPEC: 3.8
18+
# appveyor doesn't come with this directory, so use 37's since we're creating an env anyway
19+
CONDA_INSTALL_LOCN: "C:\\Miniconda37-x64"
1520

1621
platform:
1722
- x64
@@ -20,11 +25,17 @@ build: off
2025

2126
install:
2227
- cmd: call %CONDA_INSTALL_LOCN%\Scripts\activate.bat
28+
- cmd: set CONDA_PY=%CONDA_PY%
29+
- cmd: set CONDA_PY_SPEC=%CONDA_PY_SPEC%
2330
- cmd: conda config --set show_channel_urls true
2431
- cmd: conda config --add channels conda-forge
25-
#- cmd: conda update --yes --quiet conda
26-
- cmd: conda install -y pyzmq tornado jupyter_client nbformat nbconvert ipykernel pip nose
32+
- cmd: conda update --yes --quiet conda
33+
- cmd: conda info -a
34+
- cmd: conda create -y -q -n test-env-%CONDA_PY% python=%CONDA_PY_SPEC% pyzmq tornado jupyter_client nbformat nbconvert ipykernel pip nose
35+
- cmd: conda activate test-env-%CONDA_PY%
2736
- cmd: pip install .[test]
37+
# FIXME: Use patch for python 3.8, windows issues (https://github.com/ipython/ipykernel/pull/456) - remove once released
38+
- IF %CONDA_PY% == 38 pip install --upgrade git+https://github.com/ipython/ipykernel.git
2839

2940
test_script:
30-
- nosetests -v jupyter_server --exclude-dir jupyter_server\tests\selenium
41+
- pytest

jupyter_server/auth/tests/test_security.py

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

jupyter_server/extension/tests/test_extension.py

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

jupyter_server/nbconvert/tests/test_nbconvert_handlers.py

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

0 commit comments

Comments
 (0)