def testIsFuzzable(self): field = String('abc') uut = Meta(name='uut', fields=[field], fuzzable=True) num_mutations = uut.num_mutations() self.assertGreater(num_mutations, 0) self.assertGreaterEqual(num_mutations, field.num_mutations()) actual_num_mutations = 0 while uut.mutate(): actual_num_mutations += 1 self.assertEqual(actual_num_mutations, num_mutations)
def testIsFuzzable(self): field = String('abc') uut = Meta(name=self.uut_name, fields=[field], fuzzable=True) num_mutations = uut.num_mutations() self.assertGreater(num_mutations, 0) self.assertGreaterEqual(num_mutations, field.num_mutations()) actual_num_mutations = 0 while uut.mutate(): actual_num_mutations += 1 self.assertEqual(actual_num_mutations, num_mutations)
def testIsNotFuzzable(self): field = String('abc') uut = Meta(name='uut', fields=[field], fuzzable=False) self.assertEqual(uut.num_mutations(), 0) self.assertFalse(uut.mutate())
def testIsNotFuzzable(self): field = String('abc') uut = Meta(name=self.uut_name, fields=[field], fuzzable=False) self.assertEqual(uut.num_mutations(), 0) self.assertFalse(uut.mutate())