def test_escape_quote(self): intermediate = 'x = start_shexe(echo \'1\')shexe()shexe' escaped = preprocessor._escape(intermediate) self.assertEqual(escaped, 'x = start_shexe(echo \\\'1\\\')shexe()shexe')
def test_escape_nothing(self): intermediate = 'x = start_shexe(echo 1)shexe()shexe' escaped = preprocessor._escape(intermediate) self.assertEqual(escaped, intermediate)