def test_run_command_unicode_bytes(self):
        backup_Popen = catkin.builder.subprocess.Popen

        class StdOut(object):
            def __init__(self, popen):
                self.__popen = popen

            def readline(self):
                self.__popen.returncode = 0
                try:
                    # for Python 2 compatibility only
                    s = unichr(2018)
                except __HOLE__:
                    s = chr(2018)
                return s.encode('utf8')

        class MockPopen(object):
            def __init__(self, *args, **kwargs):
                self.returncode = None
                self.stdout = StdOut(self)

            def wait(self):
                return True

        try:
            catkin.builder.subprocess.Popen = MockPopen
            catkin.builder.run_command(['false'], os.getcwd(), True, True)
        finally:
            catkin.builder.subprocess.Popen = backup_Popen
dataset/ETHPy150Open ros/catkin/test/unit_tests/test_builder.py/BuilderTest.test_run_command_unicode_bytes