| OLD | NEW |
| 1 #!/usr/bin/env python | |
| 2 # Copyright (C) 2012 Google Inc. All rights reserved. | 1 # Copyright (C) 2012 Google Inc. All rights reserved. |
| 3 # | 2 # |
| 4 # Redistribution and use in source and binary forms, with or without | 3 # Redistribution and use in source and binary forms, with or without |
| 5 # modification, are permitted provided that the following conditions are | 4 # modification, are permitted provided that the following conditions are |
| 6 # met: | 5 # met: |
| 7 # | 6 # |
| 8 # * Redistributions of source code must retain the above copyright | 7 # * Redistributions of source code must retain the above copyright |
| 9 # notice, this list of conditions and the following disclaimer. | 8 # notice, this list of conditions and the following disclaimer. |
| 10 # * Redistributions in binary form must reproduce the above | 9 # * Redistributions in binary form must reproduce the above |
| 11 # copyright notice, this list of conditions and the following disclaimer | 10 # copyright notice, this list of conditions and the following disclaimer |
| 12 # in the documentation and/or other materials provided with the | 11 # in the documentation and/or other materials provided with the |
| 13 # distribution. | 12 # distribution. |
| 14 # * Neither the name of Google Inc. nor the names of its | 13 # * Neither the name of Google Inc. nor the names of its |
| 15 # contributors may be used to endorse or promote products derived from | 14 # contributors may be used to endorse or promote products derived from |
| 16 # this software without specific prior written permission. | 15 # this software without specific prior written permission. |
| 17 # | 16 # |
| 18 # THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS | 17 # THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS |
| 19 # "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT | 18 # "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT |
| 20 # LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR | 19 # LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR |
| 21 # A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT | 20 # A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT |
| 22 # OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, | 21 # OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, |
| 23 # SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT | 22 # SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT |
| 24 # LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, | 23 # LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, |
| 25 # DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY | 24 # DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY |
| 26 # THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT | 25 # THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT |
| 27 # (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE | 26 # (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE |
| 28 # OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. | 27 # OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |
| 29 | 28 |
| 30 import StringIO | 29 import StringIO |
| 31 import webkitpy.thirdparty.unittest2 as unittest | 30 import unittest |
| 32 | 31 |
| 33 from webkitpy.common.host_mock import MockHost | 32 from webkitpy.common.host_mock import MockHost |
| 34 | 33 |
| 35 from webkitpy.layout_tests.models import test_expectations | 34 from webkitpy.layout_tests.models import test_expectations |
| 36 from webkitpy.layout_tests.models import test_failures | 35 from webkitpy.layout_tests.models import test_failures |
| 37 from webkitpy.layout_tests.models import test_run_results | 36 from webkitpy.layout_tests.models import test_run_results |
| 38 from webkitpy.layout_tests.models import test_run_results | 37 from webkitpy.layout_tests.models import test_run_results |
| 39 from webkitpy.layout_tests.models import test_run_results_unittest | 38 from webkitpy.layout_tests.models import test_run_results_unittest |
| 40 from webkitpy.layout_tests.views import buildbot_results | 39 from webkitpy.layout_tests.views import buildbot_results |
| 41 | 40 |
| (...skipping 51 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 93 | 92 |
| 94 def test_print_results(self): | 93 def test_print_results(self): |
| 95 port = MockHost().port_factory.get('test') | 94 port = MockHost().port_factory.get('test') |
| 96 printer, out = self.get_printer() | 95 printer, out = self.get_printer() |
| 97 initial_results = test_run_results_unittest.run_results(port) | 96 initial_results = test_run_results_unittest.run_results(port) |
| 98 full_summary = test_run_results_unittest.summarized_results(port, expect
ed=False, passing=True, flaky=False) | 97 full_summary = test_run_results_unittest.summarized_results(port, expect
ed=False, passing=True, flaky=False) |
| 99 failing_summary = test_run_results_unittest.summarized_results(port, exp
ected=False, passing=True, flaky=False, only_include_failing=True) | 98 failing_summary = test_run_results_unittest.summarized_results(port, exp
ected=False, passing=True, flaky=False, only_include_failing=True) |
| 100 details = test_run_results.RunDetails(failing_summary['num_regressions']
, full_summary, failing_summary, initial_results, None) | 99 details = test_run_results.RunDetails(failing_summary['num_regressions']
, full_summary, failing_summary, initial_results, None) |
| 101 printer.print_results(details) | 100 printer.print_results(details) |
| 102 self.assertTrue(out.getvalue().find('but passed') != -1) | 101 self.assertTrue(out.getvalue().find('but passed') != -1) |
| OLD | NEW |