예제 #1
0
    def test_print(self):
        """ Test both cases when output is empty and when it is not """

        # output = []
        r1 = Report([])
        r1.print()
        out, err = self.capfd.readouterr()
        assert "No result." in out

        # output = [d1]
        d1 = Driver('a', 0, 0)
        r2 = Report([d1])
        r2.print()
        out, err = self.capfd.readouterr()
        assert "No result." not in out
예제 #2
0
    def print(self):
        """ Output result. """

        r = Report(self.output)
        r.print()