Skip to content

Commit 6b1cd3b

Browse files
committed
skip notebook integration tests if ipykernel not installed
1 parent 182255d commit 6b1cd3b

File tree

2 files changed

+11
-3
lines changed

2 files changed

+11
-3
lines changed

adaptive/tests/test_notebook_integration.py

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,15 @@
1-
import ipykernel.iostream
2-
import zmq
1+
import pytest
32

3+
try:
4+
import ipykernel.iostream
5+
import zmq
46

7+
with_notebook_dependencies = True
8+
except ImportError:
9+
with_notebook_dependencies = False
10+
11+
12+
@pytest.mark.skipif(not with_notebook_dependencies)
513
def test_private_api_used_in_live_info():
614
"""We are catching all errors in
715
adaptive.notebook_integration.should_update

tox.ini

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -65,4 +65,4 @@ include_trailing_comma=True
6565
force_grid_wrap=0
6666
use_parentheses=True
6767
line_length=88
68-
known_third_party=PIL,atomicwrites,holoviews,ipykernel,matplotlib,nbconvert,numpy,pytest,scipy,setuptools,skopt,sortedcollections,sortedcontainers,zmq
68+
known_third_party=PIL,atomicwrites,holoviews,matplotlib,nbconvert,numpy,pytest,scipy,setuptools,skopt,sortedcollections,sortedcontainers

0 commit comments

Comments
 (0)