Show More
@@ -16,12 +16,19 b' jobs:' | |||
|
16 | 16 | matrix: |
|
17 | 17 | os: [ubuntu-latest] |
|
18 | 18 | python-version: ["3.7", "3.8", "3.9", "3.10"] |
|
19 | deps: [test_extra] | |
|
19 | 20 | # Test all on ubuntu, test ends on macos |
|
20 | 21 | include: |
|
21 | 22 | - os: macos-latest |
|
22 | 23 | python-version: "3.7" |
|
24 | deps: test_extra | |
|
23 | 25 | - os: macos-latest |
|
24 | 26 | python-version: "3.10" |
|
27 | deps: test_extra | |
|
28 | # Tests minimal dependencies set | |
|
29 | - os: ubuntu-latest | |
|
30 | python-version: "3.10" | |
|
31 | deps: test | |
|
25 | 32 | |
|
26 | 33 | steps: |
|
27 | 34 | - uses: actions/checkout@v2 |
@@ -30,15 +37,13 b' jobs:' | |||
|
30 | 37 | with: |
|
31 | 38 | python-version: ${{ matrix.python-version }} |
|
32 | 39 | - name: Install latex |
|
33 | if: runner.os == 'Linux' | |
|
40 | if: runner.os == 'Linux' && matrix.deps == 'test_extra' | |
|
34 | 41 | run: sudo apt-get -yq -o Acquire::Retries=3 --no-install-suggests --no-install-recommends install texlive dvipng |
|
35 | 42 | - name: Install and update Python dependencies |
|
36 | 43 | run: | |
|
37 | 44 | python -m pip install --upgrade pip setuptools wheel |
|
38 |
python -m pip install --upgrade -e |
|
|
39 |
python -m pip install --upgrade |
|
|
40 | python -m pip install --upgrade pytest pytest-cov pytest-trio 'matplotlib!=3.2.0' pandas | |
|
41 | python -m pip install --upgrade check-manifest pytest-cov anyio | |
|
45 | python -m pip install --upgrade -e .[${{ matrix.deps }}] | |
|
46 | python -m pip install --upgrade check-manifest pytest-cov | |
|
42 | 47 | - name: Check manifest |
|
43 | 48 | run: check-manifest |
|
44 | 49 | - name: pytest |
@@ -742,6 +742,7 b' def test_extension():' | |||
|
742 | 742 | |
|
743 | 743 | |
|
744 | 744 | def test_notebook_export_json(): |
|
745 | pytest.importorskip("nbformat") | |
|
745 | 746 | _ip = get_ipython() |
|
746 | 747 | _ip.history_manager.reset() # Clear any existing history. |
|
747 | 748 | cmds = ["a=1", "def b():\n return a**2", "print('noël, été', b())"] |
@@ -381,6 +381,7 b' tclass.py: deleting object: C-third' | |||
|
381 | 381 | |
|
382 | 382 | def test_run_nb(self): |
|
383 | 383 | """Test %run notebook.ipynb""" |
|
384 | pytest.importorskip("nbformat") | |
|
384 | 385 | from nbformat import v4, writes |
|
385 | 386 | nb = v4.new_notebook( |
|
386 | 387 | cells=[ |
@@ -397,6 +398,7 b' tclass.py: deleting object: C-third' | |||
|
397 | 398 | |
|
398 | 399 | def test_run_nb_error(self): |
|
399 | 400 | """Test %run notebook.ipynb error""" |
|
401 | pytest.importorskip("nbformat") | |
|
400 | 402 | from nbformat import v4, writes |
|
401 | 403 | # %run when a file name isn't provided |
|
402 | 404 | pytest.raises(Exception, _ip.magic, "run") |
@@ -66,6 +66,9 b' class Audio(DisplayObject):' | |||
|
66 | 66 | Examples |
|
67 | 67 | -------- |
|
68 | 68 | |
|
69 | >>> import pytest | |
|
70 | >>> np = pytest.importorskip("numpy") | |
|
71 | ||
|
69 | 72 | Generate a sound |
|
70 | 73 | |
|
71 | 74 | >>> import numpy as np |
@@ -3,6 +3,7 b'' | |||
|
3 | 3 | # Copyright (c) IPython Development Team. |
|
4 | 4 | # Distributed under the terms of the Modified BSD License. |
|
5 | 5 | |
|
6 | import pytest | |
|
6 | 7 | import IPython.testing.tools as tt |
|
7 | 8 | |
|
8 | 9 | |
@@ -25,4 +26,5 b' def test_locate_profile_help():' | |||
|
25 | 26 | tt.help_all_output_test("locate profile") |
|
26 | 27 | |
|
27 | 28 | def test_trust_help(): |
|
29 | pytest.importorskip("nbformat") | |
|
28 | 30 | tt.help_all_output_test("trust") |
@@ -31,8 +31,8 b' init:' | |||
|
31 | 31 | install: |
|
32 | 32 | - "SET PATH=%PYTHON%;%PYTHON%\\Scripts;%PATH%" |
|
33 | 33 | - python -m pip install --upgrade setuptools pip |
|
34 | - pip install pytest pytest-cov pytest-trio matplotlib pandas | |
|
35 | - pip install -e .[test] | |
|
34 | - pip install pytest-cov | |
|
35 | - pip install -e .[test_extra] | |
|
36 | 36 | test_script: |
|
37 | 37 | - pytest --color=yes -ra --cov --cov-report=xml |
|
38 | 38 | on_finish: |
@@ -178,9 +178,18 b' extras_require = dict(' | |||
|
178 | 178 | "pytest", |
|
179 | 179 | "testpath", |
|
180 | 180 | "pygments", |
|
181 | ], | |
|
182 | test_extra=[ | |
|
183 | "pytest", | |
|
184 | "testpath", | |
|
185 | "curio", | |
|
186 | "matplotlib!=3.2.0", | |
|
181 | 187 | "nbformat", |
|
182 | 188 | "ipykernel", |
|
183 | 189 | "numpy>=1.17", |
|
190 | "pandas", | |
|
191 | "pygments", | |
|
192 | "trio", | |
|
184 | 193 | ], |
|
185 | 194 | terminal=[], |
|
186 | 195 | kernel=["ipykernel"], |
General Comments 0
You need to be logged in to leave comments.
Login now