예제 #1
0
    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
예제 #2
0
    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
예제 #3
0
    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
예제 #4
0
    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