Ejemplo n.º 1
0
 def testNoneWithAnother(self):
   """Passing none with another value is not allowed."""
   exp_str = 'none: Cannot combine with other --timing_measurements options'
   exp_regex = r'^%s$' % re.escape(exp_str)
   with self.assertRaisesRegexp(flags.ValidationError, exp_regex):
     timing_util.ValidateMeasurementsFlag(['none', 'runtimes'])
Ejemplo n.º 2
0
 def testInvalidValue(self):
   """Passing an unrecognized value is not allowed."""
   exp_str = 'test: Invalid value for --timing_measurements'
   exp_regex = r'^%s$' % re.escape(exp_str)
   with self.assertRaisesRegexp(flags.ValidationError, exp_regex):
     timing_util.ValidateMeasurementsFlag(['test'])