def __str__(self): return u'{}'.format(cpp_string_escape(self.string))
def __str__(self): return cpp_string_escape(self.string)
def test_cpp_string_escape(string, expected): actual = helpers.cpp_string_escape(string) assert actual == expected