def assertSpriteEquals(self, expected, actual):
        try:
            self.assertEquals(expected, actual)
        except:
            ENDC = '\033[0m'
            e = get_printable_sprite(expected)
            a = get_printable_sprite(actual)
            out = ''
            for i in range(8):
                if i == 4:
                    out += e[i] + ENDC + ' != ' + a[i] + ENDC + '\n'
                else:
                    out += e[i] + ENDC + '    ' + a[i] + ENDC + '\n'
            raise AssertionError('Sprites are not equal\n\n' + out)
dataset/ETHPy150Open gutomaia/pyNES/pynes/tests/__init__.py/SpriteTestCase.assertSpriteEquals/original