nbval
nbval copied to clipboard
Make cell number start at 1 to match IPython/Jupyter
Summary of changes:
- Modified
cell_numto start at 1 to match IPython/Jupyter output.
See #171 for the issue.
Pytest Failures
A couple of tests are failing on this branch, but they are also failing on master and are unrelated:
pytest tests/ --nbval --nbval-current-env --nbval-sanitize-with tests/sanitize_defaults.cfg --ignore tests/ipynb-test-samples
...
Results (28.99s):
40 passed
2 failed
- tests/test_coverage.py:14 test_coverage
- tests/test_ignore.py:18 test_conf_ignore_stderr
3 skipped
This increments for each cell, irrespective of cell type, not each code cell. A better fix is just to change the original cell count index value:
# Start the cell count
cell_num = 1
Totally agree - thanks for catching this!