When the NotebookApp raises an exception on initialization, a test can
hang forever. This can happen when passing configuration when
customizing NotebookTestBase:
```
class TestMissingExtension(NotebookTestBase):
@classmethod
def get_argv(cls):
argv = super(TestMissingExtension, cls).get_argv()
argv.extend(
[
"--NotebookApp.session_manager_class=doesnt_exist",
]
)
return argv
def test_this_will_hang_forever(self):
pass
```
Since the exception happens before the try/finally the `Event` will
never be triggered. By including the construction and initialization of
the notebook in the try/finally we can handle situations like this.
parent
e498de6775
commit
101f726690
Loading…
Reference in new issue