Exemplo n.º 1
0
 def test_negative(self):
     fn = metric_store.default_modify_fn('foo')
     with self.assertRaises(errors.MonitoringDecreasingValueError) as cm:
         fn(2, -1)
     self.assertIn('"foo"', str(cm.exception))
 def test_negative(self):
   fn = metric_store.default_modify_fn('foo')
   with self.assertRaises(errors.MonitoringDecreasingValueError) as cm:
     fn(2, -1)
   self.assertIn('"foo"', str(cm.exception))
Exemplo n.º 3
0
 def test_adds(self):
     fn = metric_store.default_modify_fn('foo')
     self.assertEquals(5, fn(2, 3))
     self.assertEquals(5, fn(3, 2))
 def test_adds(self):
   fn = metric_store.default_modify_fn('foo')
   self.assertEquals(5, fn(2, 3))
   self.assertEquals(5, fn(3, 2))