def test_read_until_not_found(self): decoder = Decoder(b'123456') with self.assertRaises(RuntimeError): decoder._read_until(b'7')
def test_read_until_found(self): decoder = Decoder(b'123456') self.assertEqual(b'123', decoder._read_until(b'4'))