コード例 #1
0
ファイル: test_common.py プロジェクト: enzochiau/gdm
    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
ファイル: test_common.py プロジェクト: enzochiau/gdm
    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
ファイル: test_common.py プロジェクト: enzochiau/gdm
    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
ファイル: test_common.py プロジェクト: enzochiau/gdm
    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
ファイル: test_common.py プロジェクト: enzochiau/gdm
    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