Did I find the right examples for you? yes no

All Samples(98)  |  Call(34)  |  Derive(64)  |  Import(0)
Unicode translation error.

src/p/l/plexnet-HEAD/third_party/generic/pypy/pypy/module/_codecs/test/test_codecs.py   plexnet(Download)
    def test_unicodetranslateerror(self):
        import sys
        assert str(UnicodeTranslateError(
            u"g\xfcrk", 1, 2, "ouch"))== "can't translate character u'\\xfc' in position 1: ouch"
 
        assert str(UnicodeTranslateError(
            u"g\u0100rk", 1, 2, "ouch"))== "can't translate character u'\\u0100' in position 1: ouch"
 
        assert str(UnicodeTranslateError(
            u"g\uffffrk", 1, 2, "ouch"))== "can't translate character u'\\uffff' in position 1: ouch"
        if sys.maxunicode > 0xffff:
            assert str(UnicodeTranslateError(
                u"g\U00010000rk", 1, 2, "ouch"))== "can't translate character u'\\U00010000' in position 1: ouch"
 
        assert str(UnicodeTranslateError(
            u"g\xfcrk", 1, 3, "ouch"))=="can't translate characters in position 1-2: ouch"

src/s/y/Sypy-HEAD/module/_codecs/test/test_codecs.py   Sypy(Download)
    def test_unicodetranslateerror(self):
        import sys
        assert str(UnicodeTranslateError(
            u"g\xfcrk", 1, 2, "ouch"))== "can't translate character u'\\xfc' in position 1: ouch"
 
        assert str(UnicodeTranslateError(
            u"g\u0100rk", 1, 2, "ouch"))== "can't translate character u'\\u0100' in position 1: ouch"
 
        assert str(UnicodeTranslateError(
            u"g\uffffrk", 1, 2, "ouch"))== "can't translate character u'\\uffff' in position 1: ouch"
        if sys.maxunicode > 0xffff and len(unichr(0x10000)) == 1:
            assert str(UnicodeTranslateError(
                u"g\U00010000rk", 1, 2, "ouch"))== "can't translate character u'\\U00010000' in position 1: ouch"
 
        assert str(UnicodeTranslateError(
            u"g\xfcrk", 1, 3, "ouch"))=="can't translate characters in position 1-2: ouch"

src/m/a/main-HEAD/External.LCA_RESTRICTED/Languages/IronPython/27/Lib/test/test_sys.py   main(Download)
        check(UnicodeDecodeError("", "", 0, 0, ""), size(h + '5P2PP'))
        # UnicodeTranslateError
        check(UnicodeTranslateError(u"", 0, 1, ""), size(h + '5P2PP'))
        # method_descriptor (descriptor object)
        check(str.lower, size(h + '2PP'))

src/m/a/main-HEAD/External.LCA_RESTRICTED/Languages/IronPython/27/Lib/test/test_exceptions.py   main(Download)
        self.assertEqual(str(u), "'4000' codec can't decode bytes in position 1000-4: 965230951443685724997")
 
        u = UnicodeTranslateError(u'xxxx', 1, 5, 'foo')
        self.assertEqual(str(u), "can't translate characters in position 1-4: foo")
        u.end = 2

src/m/a/main-HEAD/External.LCA_RESTRICTED/Languages/CPython/27/Lib/test/test_sys.py   main(Download)
        check(UnicodeDecodeError("", "", 0, 0, ""), size(h + '5P2PP'))
        # UnicodeTranslateError
        check(UnicodeTranslateError(u"", 0, 1, ""), size(h + '5P2PP'))
        # method_descriptor (descriptor object)
        check(str.lower, size(h + '2PP'))

src/m/a/main-HEAD/External.LCA_RESTRICTED/Languages/CPython/27/Lib/test/test_exceptions.py   main(Download)
        self.assertEqual(str(u), "'4000' codec can't decode bytes in position 1000-4: 965230951443685724997")
 
        u = UnicodeTranslateError(u'xxxx', 1, 5, 'foo')
        self.assertEqual(str(u), "can't translate characters in position 1-4: foo")
        u.end = 2

src/t/r/TrustRouter-HEAD/client/packaging/Windows/Python32/Lib/test/test_sys.py   TrustRouter(Download)
#        check(UnicodeDecodeError("", "", 0, 0, ""), size(h + '5P2PP'))
        # UnicodeTranslateError
        check(UnicodeTranslateError("", 0, 1, ""), size(h + '5P 2P2PP'))
        # ellipses
        check(Ellipsis, size(h + ''))

src/e/m/empythoned-HEAD/cpython/Lib/test/test_sys.py   empythoned(Download)
        check(UnicodeDecodeError("", "", 0, 0, ""), size(h + '5P2PP'))
        # UnicodeTranslateError
        check(UnicodeTranslateError(u"", 0, 1, ""), size(h + '5P2PP'))
        # method_descriptor (descriptor object)
        check(str.lower, size(h + '2PP'))

src/e/m/empythoned-HEAD/cpython/Lib/test/test_exceptions.py   empythoned(Download)
        self.assertEqual(str(u), "'4000' codec can't decode bytes in position 1000-4: 965230951443685724997")
 
        u = UnicodeTranslateError(u'xxxx', 1, 5, 'foo')
        self.assertEqual(str(u), "can't translate characters in position 1-4: foo")
        u.end = 2

src/g/i/gitstack-HEAD/python/Lib/test/test_sys.py   gitstack(Download)
        check(UnicodeDecodeError("", "", 0, 0, ""), size(h + '5P2PP'))
        # UnicodeTranslateError
        check(UnicodeTranslateError(u"", 0, 1, ""), size(h + '5P2PP'))
        # method_descriptor (descriptor object)
        check(str.lower, size(h + '2PP'))

  1 | 2 | 3 | 4 | 5  Next