-
Notifications
You must be signed in to change notification settings - Fork 37
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
Implemented decorator pattern with notebook_loader
#19
Conversation
return self.client | ||
|
||
def __exit__(self, *args): | ||
self.client._cleanup_kernel() |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We should maybe make nbclient change the name to cleanup_kernel
since it's needed to manage kernel states
self.client = client | ||
|
||
def _start_kernel(self): | ||
if self.client.km is None: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We should maybe make nbclient have a startup_kernel
since it's needed to manage kernel states
Implements #5
notebook_loader
which encapsulates the contextmanager and decorator pattern of setting up tests.prerun
argument tonotebook_loader