Пример #1
0
 def test_truncation(self):
   """Truncate."""
   self.assertEqual(
       '123456\n...truncated...\n54321',
       fuzz_task.truncate_fuzzer_output(
           '123456xxxxxxxxxxxxxxxxxxxxxxxxxxx54321', 28))
Пример #2
0
 def test_error(self):
   """Error if limit is too low."""
   with self.assertRaises(AssertionError):
     self.assertEqual(
         '', fuzz_task.truncate_fuzzer_output('123456xxxxxx54321', 10))
Пример #3
0
 def test_no_truncation(self):
   """No truncation."""
   self.assertEqual('aaaa', fuzz_task.truncate_fuzzer_output('aaaa', 10))