コード例 #1
0
ファイル: base_unittest.py プロジェクト: Andolamin/LunaSysMgr
    def test_pretty_patch_script_error(self):
        # FIXME: This is some ugly white-box test hacking ...
        port = Port(executive=executive_mock.MockExecutive2(exception=ScriptError))
        port._pretty_patch_available = True
        self.assertEqual(port.pretty_patch_text("patch.txt"),
                         port._pretty_patch_error_html)

        # This tests repeated calls to make sure we cache the result.
        self.assertEqual(port.pretty_patch_text("patch.txt"),
                         port._pretty_patch_error_html)
コード例 #2
0
ファイル: base_unittest.py プロジェクト: sitedata/webkit.org
    def test_pretty_patch_script_error(self):
        # FIXME: This is some ugly white-box test hacking ...
        port = Port(executive=executive_mock.MockExecutive2(
            exception=ScriptError))
        port._pretty_patch_available = True
        self.assertEqual(port.pretty_patch_text("patch.txt"),
                         port._pretty_patch_error_html)

        # This tests repeated calls to make sure we cache the result.
        self.assertEqual(port.pretty_patch_text("patch.txt"),
                         port._pretty_patch_error_html)
コード例 #3
0
ファイル: base_unittest.py プロジェクト: sitedata/webkit.org
    def test_pretty_patch_os_error(self):
        port = Port(executive=executive_mock.MockExecutive2(exception=OSError))
        oc = outputcapture.OutputCapture()
        oc.capture_output()
        self.assertEqual(port.pretty_patch_text("patch.txt"),
                         port._pretty_patch_error_html)

        # This tests repeated calls to make sure we cache the result.
        self.assertEqual(port.pretty_patch_text("patch.txt"),
                         port._pretty_patch_error_html)
        oc.restore_output()
コード例 #4
0
ファイル: base_unittest.py プロジェクト: Andolamin/LunaSysMgr
    def test_pretty_patch_os_error(self):
        port = Port(executive=executive_mock.MockExecutive2(exception=OSError))
        oc = outputcapture.OutputCapture()
        oc.capture_output()
        self.assertEqual(port.pretty_patch_text("patch.txt"),
                         port._pretty_patch_error_html)

        # This tests repeated calls to make sure we cache the result.
        self.assertEqual(port.pretty_patch_text("patch.txt"),
                         port._pretty_patch_error_html)
        oc.restore_output()