Test for command line execution

My notebooks render a GUI (OpenAI gym) when they run normally.

However, would like to avoid the GUIs running when I run nbdev_test_nbs.

Is there a flag I can set to test the notebook is running from the command line within nbdev_test_nbs?