def test30_10(self):
        """Tests the RS(30,10) code"""
        coder = rs.RSCoder(30,10)
        m = "Hello, wor"
        code = coder.encode(m)

        self.assertTrue( coder.verify(code) )
        self.assertEqual(m, coder.decode(code) )
        self.assertEqual(30, len(code))

        # Change 10 bytes. This code should tolerate up to 10 bytes changed
        changes = [0, 1, 2, 4, 7,
                10, 14, 18, 22, 27]
        c = list(ord(x) for x in code)
        for pos in changes:
            c[pos] = 255 % (c[pos] + 50)

        c = "".join(chr(x) for x in c)
        decode = coder.decode(c)
        self.assertEqual(m, decode)
dataset/ETHPy150Open brownan/Reed-Solomon/rstest.py/TestOtherConfig.test30_10/swapped operands of `%`