Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cell numbers are off by 1 compared to what you see in the notebook #171

Open
peytondmurray opened this issue Aug 18, 2021 · 0 comments
Open

Comments

@peytondmurray
Copy link

peytondmurray commented Aug 18, 2021

Hi all, I noticed the cell numbers reported by nbval are off by one from what you see in a jupyter notebook. Jupyter notebooks measure cell execution starting from 1, whereas nbval starts from 0. It would be a nice quality-of-life change to have the errors reported by nbval match up with the cell numbers in the notebook.

Here's an example notebook where I've generated output which doesn't match the expected output for the cell contents:

image

Notice that the cell number is 1 after freshly running the notebook from the beginning.

image

Here, pytest fails as expected, but the failure is in Cell 0.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant