Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(455)

Side by Side Diff: third_party/WebKit/Tools/Scripts/webkitpy/common/net/layouttestresults_unittest.py

Issue 1839193004: Run auto-formatter (autopep8) on webkitpy. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebased Created 4 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
1 # Copyright (c) 2010, Google Inc. All rights reserved. 1 # Copyright (c) 2010, 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 77 matching lines...) Expand 10 before | Expand all | Expand 10 after
88 "num_flaky": 0, 88 "num_flaky": 0,
89 "chromium_revision": "1234", 89 "chromium_revision": "1234",
90 "has_wdiff": false 90 "has_wdiff": false
91 });""" 91 });"""
92 92
93 def test_results_from_string(self): 93 def test_results_from_string(self):
94 self.assertIsNone(LayoutTestResults.results_from_string(None)) 94 self.assertIsNone(LayoutTestResults.results_from_string(None))
95 self.assertIsNone(LayoutTestResults.results_from_string("")) 95 self.assertIsNone(LayoutTestResults.results_from_string(""))
96 96
97 def test_was_interrupted(self): 97 def test_was_interrupted(self):
98 self.assertTrue(LayoutTestResults.results_from_string('ADD_RESULTS({"tes ts":{},"interrupted":true});').run_was_interrupted()) 98 self.assertTrue(LayoutTestResults.results_from_string(
99 self.assertFalse(LayoutTestResults.results_from_string('ADD_RESULTS({"te sts":{},"interrupted":false});').run_was_interrupted()) 99 'ADD_RESULTS({"tests":{},"interrupted":true});').run_was_interrupted ())
100 self.assertFalse(LayoutTestResults.results_from_string(
101 'ADD_RESULTS({"tests":{},"interrupted":false});').run_was_interrupte d())
100 102
101 def test_chromium_revision(self): 103 def test_chromium_revision(self):
102 self.assertEqual(LayoutTestResults.results_from_string(self.example_full _results_json).chromium_revision(), 1234) 104 self.assertEqual(LayoutTestResults.results_from_string(self.example_full _results_json).chromium_revision(), 1234)
103 105
104 def test_actual_results(self): 106 def test_actual_results(self):
105 results = LayoutTestResults.results_from_string(self.example_full_result s_json) 107 results = LayoutTestResults.results_from_string(self.example_full_result s_json)
106 self.assertEqual(results.actual_results("fast/dom/prototype-banana.html" ), "PASS") 108 self.assertEqual(results.actual_results("fast/dom/prototype-banana.html" ), "PASS")
107 self.assertEqual(results.actual_results("fast/dom/prototype-taco.html"), "PASS TEXT") 109 self.assertEqual(results.actual_results("fast/dom/prototype-taco.html"), "PASS TEXT")
108 self.assertEqual(results.actual_results("nonexistant.html"), "") 110 self.assertEqual(results.actual_results("nonexistant.html"), "")
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698