def test_runner_strips_line_magics(self, ipython) -> None:
    doc = Document()
    source = nbformat.v4.new_notebook()
    source.cells.append(nbformat.v4.new_code_cell('%time'))

    def load(filename):
        handler = bahn.NotebookHandler(filename=filename)
        handler.modify_document(doc)
        assert (handler._runner.failed is False)
    with_script_contents(source, load)
def test_runner_strips_line_magics(self, ipython) -> None:
    doc = Document()
    source = nbformat.v4.new_notebook()
    source.cells.append(nbformat.v4.new_code_cell('%time'))

    def load(filename):
        handler = bahn.NotebookHandler(filename=filename)
        handler.modify_document(doc)
        assert (handler._runner.failed is False)
    with_script_contents(source, load)