'Test %run notebook.ipynb'

def test_run_nb(self):

    from nbformat import v4, writes
    nb = v4.new_notebook(cells=[v4.new_markdown_cell('The    Ultimate    Question    of    Everything'), v4.new_code_cell('answer=42')])
    src = writes(nb, version=4)
    self.mktmp(src, ext='.ipynb')
    _ip.magic(('run    %s' % self.fname))
    nt.assert_equal(_ip.user_ns['answer'], 42)
