def test_read_id_returns_an_id(self): io = StringIO('ABCD' + self.padding) self.assertEqual(Parser.read_id(io), 'ABCD') self.assertEqual(io.pos, 4)
def test_read_id_returns_an_id(self): io = BytesIO(('ABCD' + self.padding).encode()) self.assertEqual(Parser.read_id(io), b'ABCD') self.assertEqual(io.tell(), 4)