Ejemplo n.º 1
0
    def test_show(self):
        common.show("Hello, world!", file=self.file)

        assert [
            call.write("Hello, world!"),
            call.write("\n"),
        ] == self.file.mock_calls
Ejemplo n.º 2
0
    def test_show_after_indent(self):
        common.indent()
        common.show("|\n", log=self.log)

        assert [
            call.info("|"),
        ] == self.log.mock_calls
Ejemplo n.º 3
0
    def test_show_after_indent(self):
        common.indent()
        common.show("|\n", log=self.log)

        assert [
            call.info("|"),
        ] == self.log.mock_calls
Ejemplo n.º 4
0
    def test_show(self):
        common.show("Hello, world!", file=self.file)

        assert [
            call.write("Hello, world!"),
            call.write("\n"),
        ] == self.file.mock_calls
Ejemplo n.º 5
0
    def test_show_after_indent(self):
        common.indent()
        common.show("|\n", file=self.file)

        assert [
            call.write("  |\n"),
            call.write("\n"),
        ] == self.file.mock_calls
Ejemplo n.º 6
0
    def test_show_after_indent(self):
        common.indent()
        common.show("|\n", file=self.file)

        assert [
            call.write("  |\n"),
            call.write("\n"),
        ] == self.file.mock_calls
Ejemplo n.º 7
0
    def test_show(self):
        common.show("Hello, world!", file=self.file, log=self.log)

        assert [] == self.file.mock_calls
        assert [] == self.log.mock_calls
Ejemplo n.º 8
0
    def test_show(self):
        common.show("Hello, world!", log=self.log)

        assert [
            call.info("Hello, world!"),
        ] == self.log.mock_calls
Ejemplo n.º 9
0
    def test_show(self):
        common.show("Hello, world!", file=self.file, log=self.log)

        assert [] == self.file.mock_calls
        assert [] == self.log.mock_calls
Ejemplo n.º 10
0
    def test_show(self):
        common.show("Hello, world!", log=self.log)

        assert [
            call.info("Hello, world!"),
        ] == self.log.mock_calls