##// END OF EJS Templates
Fix clashes between debugger tests and coverage.py...
Fix clashes between debugger tests and coverage.py coverage.py works by setting the trace function. But so does the debugger, so we need to re-set it afterwards to get accurate coverage results.

File last commit:

r4406:0251893c
r12286:fab155c9
Show More
nbexamples.py
29 lines | 435 B | text/x-python | PythonLexer
Brian E. Granger
Full versioning added to nbformat.
r4406 from ..nbbase import (
NotebookNode,
new_code_cell, new_text_cell, new_notebook
)
nb0 = new_notebook()
nb0.cells.append(new_text_cell(
text='Some NumPy Examples'
))
nb0.cells.append(new_code_cell(
code='import numpy',
prompt_number=1
))
nb0.cells.append(new_code_cell(
code='a = numpy.random.rand(100)',
prompt_number=2
))
nb0.cells.append(new_code_cell(
code='print a',
prompt_number=3
))