Skip to content

Commit 102a271

Browse files
committed
actions
1 parent 1b2c254 commit 102a271

File tree

2 files changed

+8
-6
lines changed

2 files changed

+8
-6
lines changed

.github/workflows/python-package.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ jobs:
1717
strategy:
1818
max-parallel: 3
1919
matrix:
20-
python-version: ["2.7", "3.10"]
20+
python-version: ["3.8", "3.9", "3.10"]
2121
steps:
2222
- uses: actions/checkout@v4
2323
- name: Set up Python ${{ matrix.python-version }}
@@ -55,7 +55,7 @@ jobs:
5555
# Exclude notebook tests
5656
nosetests -v -I test_notebook.py;
5757
- name: Test notebooks
58-
if: ${{ matrix.python-version == '2.7' }}
58+
if: ${{ true }}
5959
run: |
6060
source activate env
6161
conda install -q jupyter nbconvert -c conda-forge

tests/test_notebook.py

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
Adapted from:
66
https://blog.thedataincubator.com/2016/06/testing-jupyter-notebooks/
77
"""
8-
import os
8+
import os,sys
99
import unittest
1010
import glob
1111

@@ -18,11 +18,13 @@ def _notebook_run(path):
1818
"""Execute a notebook via nbconvert and collect output.
1919
:returns (parsed nb object, execution errors)
2020
"""
21+
kernel_name = "python"+str(sys.version_info.major)
2122
with tempfile.NamedTemporaryFile(suffix=".ipynb") as fout:
2223
args = ["jupyter", "nbconvert", "--to", "notebook", "--execute",
23-
"--ExecutePreprocessor.timeout=60",
24-
"--log-level=WARN",
25-
"--output", fout.name, path]
24+
"--ExecutePreprocessor.timeout=60",
25+
"--kernel_name", kernel_name,
26+
"--log-level=WARN",
27+
"--output", fout.name, path]
2628
subprocess.check_call(args)
2729

2830
fout.seek(0)

0 commit comments

Comments
 (0)