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

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

Issue 326483002: Make update-flaky-tests work for debug builders as well. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: add tests Created 6 years, 6 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 a95352398d11ea833a543010dbbcb5944cbb36d5..d3b8b1662746c18c97eee8824ea4682dc60ebe59 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
@@ -30,6 +30,40 @@ import webkitpy.thirdparty.unittest2 as unittest
from webkitpy.layout_tests.layout_package import bot_test_expectations
from webkitpy.layout_tests.models import test_expectations
+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')
+
+ def test_expectations_for_builder(self):
+ factory = bot_test_expectations.BotTestExpectationsFactory()
+ factory._results_json_for_builder = self.fake_results_json_for_builder
+
+ old_builders = builders._exact_matches
+ builders._exact_matches = {
+ "Dummy builder name": {"port_name": "dummy-port", "specifiers": []},
+ }
+
+ try:
+ self.assertIsNotNone(factory.expectations_for_builder('Dummy builder name'))
+ finally:
+ builders._exact_matches = old_builders
+
+ def test_expectations_for_port(self):
+ factory = bot_test_expectations.BotTestExpectationsFactory()
+ factory._results_json_for_builder = self.fake_results_json_for_builder
+
+ old_builders = builders._exact_matches
+ builders._exact_matches = {
+ "Dummy builder name": {"port_name": "dummy-port", "specifiers": []},
+ }
+
+ try:
+ self.assertIsNotNone(factory.expectations_for_port('dummy-port'))
+ finally:
+ builders._exact_matches = old_builders
class BotTestExpectationsTest(unittest.TestCase):

Powered by Google App Engine
This is Rietveld 408576698