def test_runner_strips_cell_magics(self) -> None:
    doc = Document()
    source = nbformat.v4.new_notebook()
    code = '%%timeit\n1+1'
    source.cells.append(nbformat.v4.new_code_cell(code))

    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_cell_magics(self) -> None:
    doc = Document()
    source = nbformat.v4.new_notebook()
    code = '%%timeit\n1+1'
    source.cells.append(nbformat.v4.new_code_cell(code))

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