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

Unified Diff: telemetry/telemetry/story/expectations_unittest.py

Issue 2903023002: [Telemetry] Do not have benchmarks validate story name in expectations during runs. (Closed)
Patch Set: [Telemetry] Do not have benchmarks validate story name in expectations during runs. Created 3 years, 7 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: telemetry/telemetry/story/expectations_unittest.py
diff --git a/telemetry/telemetry/story/expectations_unittest.py b/telemetry/telemetry/story/expectations_unittest.py
index 76c0b11384b83f538cc261529592c51028d6de4b..db76fa60a4413a9f57c0f04403106210661dec68 100644
--- a/telemetry/telemetry/story/expectations_unittest.py
+++ b/telemetry/telemetry/story/expectations_unittest.py
@@ -259,23 +259,20 @@ class StoryExpectationsTest(unittest.TestCase):
with self.assertRaises(AssertionError):
FooExpectations()
- def testValidateAgainstStorySetNotMatching(self):
+ def testGetBrokenExpectationsNotMatching(self):
class FooExpectations(expectations.StoryExpectations):
def SetExpectations(self):
self.DisableStory('bad_name', [expectations.ALL], 'crbug.com/123')
e = FooExpectations()
s = MockStorySet([MockStory('good_name')])
- with self.assertRaises(TypeError):
- e.ValidateAgainstStorySet(s)
+ self.assertEqual(e.GetBrokenExpectations(s), ['bad_name'])
- def testValidateAgainstStorySetMatching(self):
+ def testGetBrokenExpectationsMatching(self):
class FooExpectations(expectations.StoryExpectations):
def SetExpectations(self):
self.DisableStory('good_name', [expectations.ALL], 'crbug.com/123')
e = FooExpectations()
s = MockStorySet([MockStory('good_name')])
- e.ValidateAgainstStorySet(s)
- # If no exception is thrown, then it means that the validation passed.
-
+ self.assertEqual(e.GetBrokenExpectations(s), [])
« telemetry/telemetry/internal/story_runner.py ('K') | « telemetry/telemetry/story/expectations.py ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698