OLD | NEW |
1 # Copyright (C) 2010, 2012 Google Inc. All rights reserved. | 1 # Copyright (C) 2010, 2012 Google Inc. All rights reserved. |
2 # | 2 # |
3 # Redistribution and use in source and binary forms, with or without | 3 # Redistribution and use in source and binary forms, with or without |
4 # modification, are permitted provided that the following conditions are | 4 # modification, are permitted provided that the following conditions are |
5 # met: | 5 # met: |
6 # | 6 # |
7 # * Redistributions of source code must retain the above copyright | 7 # * Redistributions of source code must retain the above copyright |
8 # notice, this list of conditions and the following disclaimer. | 8 # notice, this list of conditions and the following disclaimer. |
9 # * Redistributions in binary form must reproduce the above | 9 # * Redistributions in binary form must reproduce the above |
10 # copyright notice, this list of conditions and the following disclaimer | 10 # copyright notice, this list of conditions and the following disclaimer |
(...skipping 114 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
125 def test_print_config(self): | 125 def test_print_config(self): |
126 printer, err = self.get_printer() | 126 printer, err = self.get_printer() |
127 # FIXME: it's lame that i have to set these options directly. | 127 # FIXME: it's lame that i have to set these options directly. |
128 printer._options.pixel_tests = True | 128 printer._options.pixel_tests = True |
129 printer._options.new_baseline = True | 129 printer._options.new_baseline = True |
130 printer._options.time_out_ms = 6000 | 130 printer._options.time_out_ms = 6000 |
131 printer._options.slow_time_out_ms = 12000 | 131 printer._options.slow_time_out_ms = 12000 |
132 printer.print_config('/tmp') | 132 printer.print_config('/tmp') |
133 self.assertIn("Using port 'test-mac-leopard'", err.getvalue()) | 133 self.assertIn("Using port 'test-mac-leopard'", err.getvalue()) |
134 self.assertIn('Test configuration: <leopard, x86, release>', err.getvalu
e()) | 134 self.assertIn('Test configuration: <leopard, x86, release>', err.getvalu
e()) |
135 self.assertIn('Placing test results in /tmp', err.getvalue()) | 135 self.assertIn('View the test results at file:///tmp', err.getvalue()) |
136 self.assertIn('Baseline search path: test-mac-leopard -> test-mac-snowle
opard -> generic', err.getvalue()) | 136 self.assertIn('Baseline search path: test-mac-leopard -> test-mac-snowle
opard -> generic', err.getvalue()) |
137 self.assertIn('Using Release build', err.getvalue()) | 137 self.assertIn('Using Release build', err.getvalue()) |
138 self.assertIn('Pixel tests enabled', err.getvalue()) | 138 self.assertIn('Pixel tests enabled', err.getvalue()) |
139 self.assertIn('Command line:', err.getvalue()) | 139 self.assertIn('Command line:', err.getvalue()) |
140 self.assertIn('Regular timeout: ', err.getvalue()) | 140 self.assertIn('Regular timeout: ', err.getvalue()) |
141 | 141 |
142 self.reset(err) | 142 self.reset(err) |
143 printer._options.quiet = True | 143 printer._options.quiet = True |
144 printer.print_config('/tmp') | 144 printer.print_config('/tmp') |
145 self.assertNotIn('Baseline search path: test-mac-leopard -> test-mac-sno
wleopard -> generic', err.getvalue()) | 145 self.assertNotIn('Baseline search path: test-mac-leopard -> test-mac-sno
wleopard -> generic', err.getvalue()) |
(...skipping 95 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
241 printer.print_finished_test(result, expected=True, exp_str='', got_str='
') | 241 printer.print_finished_test(result, expected=True, exp_str='', got_str='
') |
242 | 242 |
243 printer.print_started_test('passes/text.html') | 243 printer.print_started_test('passes/text.html') |
244 result = self.get_result('passes/text.html') | 244 result = self.get_result('passes/text.html') |
245 printer.print_finished_test(result, expected=True, exp_str='', got_str='
') | 245 printer.print_finished_test(result, expected=True, exp_str='', got_str='
') |
246 | 246 |
247 # Only the first test's start should be printed. | 247 # Only the first test's start should be printed. |
248 lines = err.buflist | 248 lines = err.buflist |
249 self.assertEqual(len(lines), 1) | 249 self.assertEqual(len(lines), 1) |
250 self.assertTrue(lines[0].endswith('passes/image.html\n')) | 250 self.assertTrue(lines[0].endswith('passes/image.html\n')) |
OLD | NEW |