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

Unified Diff: Tools/Scripts/webkitpy/layout_tests/layout_package/bot_test_expectations_unittest.py

Issue 546133003: Reformat webkitpy.layout_tests w/ format-webkitpy. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 6 years, 3 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 side-by-side diff with in-line comments
Download patch
Index: Tools/Scripts/webkitpy/layout_tests/layout_package/bot_test_expectations_unittest.py
diff --git a/Tools/Scripts/webkitpy/layout_tests/layout_package/bot_test_expectations_unittest.py b/Tools/Scripts/webkitpy/layout_tests/layout_package/bot_test_expectations_unittest.py
index 85ac8515f1f7e2d69b8e8f3544f903a352102d12..ee15ac27055bf545ac9a00bf9c091991b4fc1216 100644
--- a/Tools/Scripts/webkitpy/layout_tests/layout_package/bot_test_expectations_unittest.py
+++ b/Tools/Scripts/webkitpy/layout_tests/layout_package/bot_test_expectations_unittest.py
@@ -34,6 +34,7 @@ from webkitpy.layout_tests.port import builders
class BotTestExpectationsFactoryTest(unittest.TestCase):
+
def fake_results_json_for_builder(self, builder):
return bot_test_expectations.ResultsJSON(builder, 'Dummy content')
@@ -43,7 +44,7 @@ class BotTestExpectationsFactoryTest(unittest.TestCase):
old_builders = builders._exact_matches
builders._exact_matches = {
- "Dummy builder name": {"port_name": "dummy-port", "specifiers": []},
+ 'Dummy builder name': {'port_name': 'dummy-port', 'specifiers': []},
}
try:
@@ -57,7 +58,7 @@ class BotTestExpectationsFactoryTest(unittest.TestCase):
old_builders = builders._exact_matches
builders._exact_matches = {
- "Dummy builder name": {"port_name": "dummy-port", "specifiers": []},
+ 'Dummy builder name': {'port_name': 'dummy-port', 'specifiers': []},
}
try:
@@ -68,8 +69,8 @@ class BotTestExpectationsFactoryTest(unittest.TestCase):
class BotTestExpectationsTest(unittest.TestCase):
# FIXME: Find a way to import this map from Tools/TestResultServer/model/jsonresults.py.
- FAILURE_MAP = {"A": "AUDIO", "C": "CRASH", "F": "TEXT", "I": "IMAGE", "O": "MISSING",
- "N": "NO DATA", "P": "PASS", "T": "TIMEOUT", "Y": "NOTRUN", "X": "SKIP", "Z": "IMAGE+TEXT", "K": "LEAK"}
+ FAILURE_MAP = {'A': 'AUDIO', 'C': 'CRASH', 'F': 'TEXT', 'I': 'IMAGE', 'O': 'MISSING',
+ 'N': 'NO DATA', 'P': 'PASS', 'T': 'TIMEOUT', 'Y': 'NOTRUN', 'X': 'SKIP', 'Z': 'IMAGE+TEXT', 'K': 'LEAK'}
# All result_string's in this file expect newest result
# on left: "PFF", means it just passed after 2 failures.
@@ -134,12 +135,12 @@ class BotTestExpectationsTest(unittest.TestCase):
}
}
self._assert_expectations(test_data, {
- 'foo/veryflaky.html': sorted(["TEXT", "PASS"]),
+ 'foo/veryflaky.html': sorted(['TEXT', 'PASS']),
}, only_ignore_very_flaky=True)
self._assert_expectations(test_data, {
- 'foo/veryflaky.html': sorted(["TEXT", "PASS"]),
- 'foo/maybeflaky.html': sorted(["TEXT", "PASS"]),
+ 'foo/veryflaky.html': sorted(['TEXT', 'PASS']),
+ 'foo/maybeflaky.html': sorted(['TEXT', 'PASS']),
}, only_ignore_very_flaky=False)
def test_all_failure_types(self):
@@ -152,8 +153,8 @@ class BotTestExpectationsTest(unittest.TestCase):
}
}
self._assert_expectations(test_data, {
- 'foo/imageplustextflake.html': sorted(["IMAGE+TEXT", "PASS"]),
- 'foo/allfailures.html': sorted(["TEXT", "PASS", "IMAGE+TEXT", "TIMEOUT", "CRASH", "IMAGE", "MISSING", "LEAK"]),
+ 'foo/imageplustextflake.html': sorted(['IMAGE+TEXT', 'PASS']),
+ 'foo/allfailures.html': sorted(['TEXT', 'PASS', 'IMAGE+TEXT', 'TIMEOUT', 'CRASH', 'IMAGE', 'MISSING', 'LEAK']),
}, only_ignore_very_flaky=True)
def test_unexpected_results_no_unexpected(self):
@@ -187,12 +188,12 @@ class BotTestExpectationsTest(unittest.TestCase):
}
self.maxDiff = None
self._assert_unexpected_results(test_data, {
- 'foo/pass1.html': sorted(["FAIL", "PASS"]),
- 'foo/pass2.html': sorted(["IMAGE", "PASS"]),
- 'foo/fail.html': sorted(["TEXT", "PASS"]),
- 'foo/f_p.html': sorted(["TEXT", "PASS"]),
- 'foo/crash.html': sorted(["WONTFIX", "CRASH", "TEXT"]),
- 'foo/image.html': sorted(["CRASH", "FAIL", "IMAGE"]),
- 'foo/i_f.html': sorted(["PASS", "IMAGE", "TEXT"]),
- 'foo/all.html': sorted(["TEXT", "PASS", "IMAGE+TEXT", "TIMEOUT", "CRASH", "IMAGE", "MISSING", "LEAK"]),
+ 'foo/pass1.html': sorted(['FAIL', 'PASS']),
+ 'foo/pass2.html': sorted(['IMAGE', 'PASS']),
+ 'foo/fail.html': sorted(['TEXT', 'PASS']),
+ 'foo/f_p.html': sorted(['TEXT', 'PASS']),
+ 'foo/crash.html': sorted(['WONTFIX', 'CRASH', 'TEXT']),
+ 'foo/image.html': sorted(['CRASH', 'FAIL', 'IMAGE']),
+ 'foo/i_f.html': sorted(['PASS', 'IMAGE', 'TEXT']),
+ 'foo/all.html': sorted(['TEXT', 'PASS', 'IMAGE+TEXT', 'TIMEOUT', 'CRASH', 'IMAGE', 'MISSING', 'LEAK']),
})

Powered by Google App Engine
This is Rietveld 408576698