As I develop a notebook, I like to store tester code down at the bottom. But this means I can't Run All or Run All Below without the tester code running. (Yes, I can scroll down and Run All Above.) Is there something I can enter into a cell that would keep the notebook from continuing to run cells? I don't want to halt the kernel or interrupt what is running (i.e. I don't want an exception thrown). I'm thinking a magic, e.g. %stop, would do the trick. (I looked at the existing magics, but didn't find anything like this.)
--
You received this message because you are subscribed to the Google Groups "Project Jupyter" group.
To unsubscribe from this group and stop receiving emails from it, send an email to jupyter+unsubscribe@googlegroups.com.
To post to this group, send email to jup...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/jupyter/75cbcc60-69d6-4bc3-bccc-70dfce541c40%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
# don't go beyond here with Run Allassert FalseYou are using Jupyter notebook.
The version of the notebook server is: 5.7.4
The server is running on this version of Python:
Python 3.6.6 |Anaconda, Inc.| (default, Jun 28 2018, 11:27:44) [MSC v.1900 64 bit (AMD64)]
Python 3.6.6 |Anaconda, Inc.| (default, Jun 28 2018, 11:27:44) [MSC v.1900 64 bit (AMD64)] Type 'copyright', 'credits' or 'license' for more information IPython 7.3.0 -- An enhanced Interactive Python. Type '?' for help.
One option would be raise an exception in a new cell above your tester cell.Another option would be to a variable defined in the notebooks first cell (TESTING=False). You can then wrap your tests in an if testing: block, setting testing to True if you actually want them to run.
On Wed, Feb 15, 2017 at 12:11 PM, John Marino <john.d...@gmail.com> wrote:
As I develop a notebook, I like to store tester code down at the bottom. But this means I can't Run All or Run All Below without the tester code running. (Yes, I can scroll down and Run All Above.) Is there something I can enter into a cell that would keep the notebook from continuing to run cells? I don't want to halt the kernel or interrupt what is running (i.e. I don't want an exception thrown). I'm thinking a magic, e.g. %stop, would do the trick. (I looked at the existing magics, but didn't find anything like this.)
--
You received this message because you are subscribed to the Google Groups "Project Jupyter" group.
To unsubscribe from this group and stop receiving emails from it, send an email to jupyter+u...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/jupyter/817c8af8-e9b6-48d5-8a86-e15b068e6056%40googlegroups.com.