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

Fix faulty prerun logic in notebook_loader #28

Merged
merged 2 commits into from
Jun 13, 2020

Conversation

rohitsanj
Copy link
Member

The current prerun functionality is faulty. It enters a kernel context, executes the specified cells and then exits the context. This means that the only thing modified is the output of the said cells of the notebook, and not the kernel context itself.

I've moved the prerun logic in to the entry points of decorator pattern (__call__) and context manager pattern (__enter__), which will then preserve the context of the prerun cells during the lifetime of the test.

This means that sharing kernel context #17 across tests needs to be discussed further.

@rohitsanj rohitsanj merged commit cbef9f0 into nteract:master Jun 13, 2020
@rohitsanj rohitsanj added this to the 0.1.0 milestone Jun 18, 2020
@rohitsanj rohitsanj added the GSoC-2020 Part of Google Summer of Code 2020 label Aug 29, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
GSoC-2020 Part of Google Summer of Code 2020
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant