示例#1
0
 def test_not_triggered_if_not_matched(self):
     c = crashpoint.CrashCondition('bar', 'foofunc', 0)
     self.assertFalse(c.triggered('bar', 'otherfunc'))
示例#2
0
 def test_triggered_second_time_with_count_of_two(self):
     c = crashpoint.CrashCondition('bar', 'foofunc', 2)
     self.assertFalse(c.triggered('bar', 'foofunc'))
     self.assertTrue(c.triggered('bar', 'foofunc'))
示例#3
0
 def test_triggered_second_time_with_zero_count(self):
     c = crashpoint.CrashCondition('bar', 'foofunc', 0)
     self.assertTrue(c.triggered('bar', 'foofunc'))
     self.assertTrue(c.triggered('bar', 'foofunc'))
示例#4
0
 def test_triggered_first_time_with_count_of_one(self):
     c = crashpoint.CrashCondition('bar', 'foofunc', 1)
     self.assertTrue(c.triggered('bar', 'foofunc'))
示例#5
0
 def setUp(self):
     self.c = crashpoint.CrashCondition('bar', 'foofunc', 0)