def test_infinite_recursion(self): nb = self._read_nb("files/infinite-recursion.ipynb") pp = LimitOutput() nb, resources = pp.preprocess(nb, {}) cell, = nb.cells output, = cell.outputs assert len(output.traceback) == 100
def test_long_output(self): nb = self._read_nb("files/long-output.ipynb") cell, = nb.cells output, = cell.outputs assert len(output.text.split("\n")) > 1000 pp = LimitOutput() nb, resources = pp.preprocess(nb, {}) cell, = nb.cells output, = cell.outputs assert len(output.text.split("\n")) == 1000