Skip to content

Commit 1fdf77c

Browse files
authored
Merge pull request #33 from pwrose/master
added example to test.py
2 parents 83049b1 + 6586491 commit 1fdf77c

File tree

2 files changed

+24
-0
lines changed

2 files changed

+24
-0
lines changed

.travis.yml

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
language: python
2+
python:
3+
- "3.6"
4+
cache: pip
5+
install:
6+
- pip install -r requirements.txt
7+
script:
8+
- python tests.py

test.py

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
import subprocess
2+
import tempfile
3+
4+
5+
def _exec_notebook(path):
6+
with tempfile.NamedTemporaryFile(suffix=".ipynb") as fout:
7+
print(fout.name)
8+
args = ["jupyter", "nbconvert", "--to", "notebook", "--execute",
9+
"--ExecutePreprocessor.timeout=1000",
10+
"--output", fout.name, path]
11+
subprocess.check_call(args)
12+
13+
14+
def test():
15+
_exec_notebook('./example1/0-Workflow.ipynb')
16+
_exec_notebook('./example2/0-Workflow.ipynb')

0 commit comments

Comments
 (0)