| Index: telemetry/telemetry/story/expectations_unittest.py
|
| diff --git a/telemetry/telemetry/story/expectations_unittest.py b/telemetry/telemetry/story/expectations_unittest.py
|
| index bef07a91ea1194163957c8066eaf2a035b41aa10..86f84c6fc229619f218cf75b81c771753593c706 100644
|
| --- a/telemetry/telemetry/story/expectations_unittest.py
|
| +++ b/telemetry/telemetry/story/expectations_unittest.py
|
| @@ -294,6 +294,8 @@ class StoryExpectationsTest(unittest.TestCase):
|
| with self.assertRaises(AssertionError):
|
| e.PermanentlyDisableBenchmark(['test'], 'test')
|
| with self.assertRaises(AssertionError):
|
| + e.TemporarilyDisableBenchmark(['test'], 'test')
|
| + with self.assertRaises(AssertionError):
|
| e.DisableStory('story', ['platform'], 'reason')
|
|
|
| def testPermanentlyDisableBenchmark(self):
|
| @@ -305,12 +307,39 @@ class StoryExpectationsTest(unittest.TestCase):
|
| e = FooExpectations()
|
| self.platform.SetOSName('win')
|
|
|
| - reason = e.IsBenchmarkDisabled(self.platform, self.finder_options)
|
| + reason = e.IsBenchmarkPermanentlyDisabled(
|
| + self.platform, self.finder_options)
|
| self.assertEqual(reason, 'crbug.com/123')
|
| + self.assertIsNone(
|
| + e.IsBenchmarkTemporarilyDisabled(self.platform, self.finder_options))
|
|
|
| self.platform.SetOSName('android')
|
| - reason = e.IsBenchmarkDisabled(self.platform, self.finder_options)
|
| - self.assertIsNone(reason)
|
| + self.assertIsNone(
|
| + e.IsBenchmarkPermanentlyDisabled(self.platform, self.finder_options))
|
| + self.assertIsNone(
|
| + e.IsBenchmarkTemporarilyDisabled(self.platform, self.finder_options))
|
| +
|
| + def testTemporarilyDisableBenchmark(self):
|
| + class FooExpectations(expectations.StoryExpectations):
|
| + def SetExpectations(self):
|
| + self.TemporarilyDisableBenchmark(
|
| + [expectations.ALL_WIN], 'crbug.com/123')
|
| +
|
| + e = FooExpectations()
|
| + self.platform.SetOSName('win')
|
| +
|
| + reason = e.IsBenchmarkTemporarilyDisabled(
|
| + self.platform, self.finder_options)
|
| + self.assertEqual(reason, 'crbug.com/123')
|
| + self.assertIsNone(
|
| + e.IsBenchmarkPermanentlyDisabled(self.platform, self.finder_options))
|
| +
|
| + self.platform.SetOSName('android')
|
| + self.assertIsNone(
|
| + e.IsBenchmarkTemporarilyDisabled(self.platform, self.finder_options))
|
| + self.assertIsNone(
|
| + e.IsBenchmarkPermanentlyDisabled(self.platform, self.finder_options))
|
| +
|
|
|
| def testDisableStoryMultipleConditions(self):
|
| class FooExpectations(expectations.StoryExpectations):
|
|
|