Skip to content

Commit 1087282

Browse files
committed
Fix output testing failing silently
Inline output tests in .travis.yml as well.
1 parent 4503f41 commit 1087282

File tree

3 files changed

+5
-10
lines changed

3 files changed

+5
-10
lines changed

.travis.yml

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,4 +22,7 @@ script:
2222
# Test that notebooks run successfully
2323
- treon
2424
# Naive test to check that output committed with notebook-
25-
- find . -name "*.ipynb" -exec sh test/test_output.sh "{}" \;
25+
- >- # carefully escaped because yaml is picky
26+
find . -name "*.ipynb" \
27+
-exec test $(grep -oc '"outputs": ' "{}") -eq $(grep -oc '"cell_type": "code"' "{}") \; \
28+
|| exit 1

test/README.md

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,14 +12,13 @@ on Travis.
1212

1313
The tests also check if output is committed with the notebook (which it should be).
1414
This test is naive - it tests if the number of code cells in a notebook is equal to
15-
the number of cell outputs in the same notebook.
15+
the number of cell outputs in the same notebook. (See `.travis.yml`.)
1616

1717
## Structure
1818

1919
.
2020
├── README.md You are here!
2121
├── ignore Add a directory to this file (one per line) to skip during testing
22-
├── test_output.sh Tests that output has been committed with the notebook.
2322
├── requirements-dev.txt Dependencies for running the tests
2423
└── requirements.txt Dependencies for running notebooks (global)
2524

test/test_output.sh

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

0 commit comments

Comments
 (0)