예제 #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
예제 #2
0
    def test_show_after_indent(self):
        common.indent()
        common.show("|\n", log=self.log)

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

        assert [
            call.info("|"),
        ] == self.log.mock_calls
예제 #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
예제 #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
예제 #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
예제 #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
예제 #8
0
    def test_show(self):
        common.show("Hello, world!", log=self.log)

        assert [
            call.info("Hello, world!"),
        ] == self.log.mock_calls
예제 #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
예제 #10
0
    def test_show(self):
        common.show("Hello, world!", log=self.log)

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