def test_to_str(self):
        input_ = ArgvInput(['cli.py', '-f', 'foo'])
        self.assertEqual('-f foo', str(input_))

        input_ = ArgvInput(['cli.py', '-f', '--bar=foo', 'a b c d', "A\nB'C"])

        def escape(s):
            return "\\'".join("'" + p + "'" for p in s.split("'"))

        self.assertEqual(
            '-f --bar=foo ' + escape('a b c d') + ' ' + escape("A\nB'C"),
            str(input_)
        )
dataset/ETHPy150Open sdispater/cleo/tests/inputs/test_argv_input.py/ArgvInputTest.test_to_str/original