Beispiel #1
0
    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'")
Beispiel #2
0
    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'")
Beispiel #3
0
    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'")
Beispiel #4
0
 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)
Beispiel #5
0
 def __sentry__(self):
     return compat.u('example')
Beispiel #6
0
 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)
Beispiel #7
0
    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'")
Beispiel #8
0
 def __sentry__(self):
     return compat.u('example')