def test_unicode_in_python2(self): # 'רונית מגן' x = compat.u('\u05e8\u05d5\u05e0\u05d9\u05ea \u05de\u05d2\u05df') result = transform(x) assert result == compat.u( "u'\u05e8\u05d5\u05e0\u05d9\u05ea \u05de\u05d2\u05df'")
def test_unicode_in_python2(self): # 'רונית מגן' x = compat.u('\u05e8\u05d5\u05e0\u05d9\u05ea \u05de\u05d2\u05df') result = transform(x) assert result == compat.u("u'\u05e8\u05d5\u05e0\u05d9\u05ea \u05de\u05d2\u05df'")
def test_truncating_unicode(self): # 'רונית מגן' x = compat.u('\u05e8\u05d5\u05e0\u05d9\u05ea \u05de\u05d2\u05df') result = transform(x, string_max_length=5) assert result == compat.u("u'\u05e8\u05d5\u05e0\u05d9\u05ea'")
def test_string_max_length(self): x = compat.u('1234') result = transform(x, string_max_length=3) expected = "'123'" if compat.PY3 else "u'123'" self.assertEqual(result, expected)
def __sentry__(self): return compat.u('example')