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

Don't save coverage setup and teardown to history #198

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions nbval/_cover4.py
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ def setup_coverage(config, kernel, floc, output_loc=None):

# Build setup command and execute in kernel:
cmd = _python_setup % (data_file, source, config_file)
msg_id = kernel.kc.execute(cmd, stop_on_error=False)
msg_id = kernel.kc.execute(cmd, stop_on_error=False, store_history=False)
kernel.await_idle(msg_id, 60) # A minute should be plenty to enable coverage
else:
warnings.warn_explicit(
Expand All @@ -78,7 +78,7 @@ def teardown_coverage(config, kernel, output_loc=None):
language = kernel.language
if language.startswith('python'):
# Teardown code does not require any input, simply execute:
msg_id = kernel.kc.execute(_python_teardown)
msg_id = kernel.kc.execute(_python_teardown, store_history=False)
kernel.await_idle(msg_id, 60) # A minute should be plenty to write out coverage

# Ensure we merge our data into parent data of pytest-cov, if possible
Expand Down
4 changes: 2 additions & 2 deletions nbval/_cover5.py
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ def setup_coverage(config, kernel, floc, output_loc=None):

# Build setup command and execute in kernel:
cmd = _python_setup % (data_file, source, config_file)
msg_id = kernel.kc.execute(cmd, stop_on_error=False)
msg_id = kernel.kc.execute(cmd, stop_on_error=False, store_history=False)
kernel.await_idle(msg_id, 60) # A minute should be plenty to enable coverage
else:
warnings.warn_explicit(
Expand All @@ -80,7 +80,7 @@ def teardown_coverage(config, kernel, output_loc=None):
language = kernel.language
if language.startswith('python'):
# Teardown code does not require any input, simply execute:
msg_id = kernel.kc.execute(_python_teardown)
msg_id = kernel.kc.execute(_python_teardown, store_history=False)
kernel.await_idle(msg_id, 60) # A minute should be plenty to write out coverage

else:
Expand Down