def test_decode_int_123(self):
     self.assertEqual(decoder.decode_int(b'i123e'), 123)
 def test_decode_int_emptyneg_err(self):
     with self.assertRaises(decoder.DecodeError):
         decoder.decode_int(b'i-e')
 def test_decode_int_2negleadingzeros_err(self):
     with self.assertRaises(decoder.DecodeError):
         decoder.decode_int(b'i-003e')
 def test_decode_int_negzero_err(self):
     with self.assertRaises(decoder.DecodeError):
         decoder.decode_int(b'i-0e')
 def test_decode_int_neg123(self):
     self.assertEqual(decoder.decode_int(b'i-123e'), -123)
 def test_decode_int_zero(self):
     self.assertEqual(decoder.decode_int(b'i0e'), 0)