/usr/lib64/python2.6/site-packages/simplejson/tests
Edit: /usr/lib64/python2.6/site-packages/simplejson/tests/test_unicode.pyc (8491B)
Ñò
}DVc @ sv d d k Z d d k Z d d k l Z d d k Z d d k l Z l Z l Z l
Z
l Z d e f d „ ƒ YZ d S( iÿÿÿÿN( t TestCase( t unichrt text_typet bt ut BytesIOt TestUnicodec B sª e Z d „ Z d „ Z d „ Z d „ Z d „ Z d „ Z d „ Z d „ Z d „ Z
d „ Z d
„ Z d „ Z
d „ Z d
„ Z d „ Z d „ Z d „ Z d „ Z RS( c C sY t i d d ƒ } d } | i d ƒ } | i | ƒ } | i | ƒ } | i | | ƒ d S( Nt encodings utf-8u αΩ( t jsont JSONEncodert encodet assertEqual( t selft encoderR t st jut js( ( sC /usr/lib64/python2.6/site-packages/simplejson/tests/test_unicode.pyt test_encoding1 s c C sS d } | i d ƒ } t i | d d ƒ} t i | d d ƒ} | i | | ƒ d S( Nu αΩs utf-8R ( R
R t dumpsR ( R R R R R ( ( sC /usr/lib64/python2.6/site-packages/simplejson/tests/test_unicode.pyt test_encoding2 s
c C s) d } t i | ƒ } | i | d ƒ d S( Nu αΩs "\u03b1\u03a9"( R R R ( R R t j( ( sC /usr/lib64/python2.6/site-packages/simplejson/tests/test_unicode.pyt test_encoding3 s c C s, d } t i | g ƒ } | i | d ƒ d S( Nu αΩs ["\u03b1\u03a9"]( R R R ( R R R ( ( sC /usr/lib64/python2.6/site-packages/simplejson/tests/test_unicode.pyt test_encoding4 s c C s7 d } t i | d t ƒ} | i | d | d ƒ d S( Nu αΩt ensure_asciiu "( R R t FalseR ( R R R ( ( sC /usr/lib64/python2.6/site-packages/simplejson/tests/test_unicode.pyt test_encoding5" s c C s: d } t i | g d t ƒ} | i | d | d ƒ d S( Nu αΩR u ["u "]( R R R R ( R R R ( ( sC /usr/lib64/python2.6/site-packages/simplejson/tests/test_unicode.pyt test_encoding6' s c C sB d } | i t i | ƒ d ƒ | i t i | d t ƒd ƒ d S( Nu ð„ s "\ud834\udd20"R u "ð„ "( R R R R ( R R ( ( sC /usr/lib64/python2.6/site-packages/simplejson/tests/test_unicode.pyt test_big_unicode_encode, s c C sD d } | i t i d | d ƒ | ƒ | i t i d ƒ | ƒ d S( Nu zð„ xt "s "z\ud834\udd20x"( R R t loads( R R ( ( sC /usr/lib64/python2.6/site-packages/simplejson/tests/test_unicode.pyt test_big_unicode_decode1 s !c C sP xI t d d ƒ D]8 } t | ƒ } d | f } | i t i | ƒ | ƒ q Wd S( Ni iÿ× s "\u%04x"( t rangeR R R R ( R t iR R ( ( sC /usr/lib64/python2.6/site-packages/simplejson/tests/test_unicode.pyt test_unicode_decode6 s
c C sä d } d d d d d d d g } | i t i | ƒ t | ƒ ƒ | i t i | d d „ ƒ| ƒ t i | d t i ƒ} | i | t i | ƒ ƒ | i t | ƒ t i ƒ | i t i | d t i d d „ ƒt i | ƒ ƒ d S( Nu? {"xkd":1, "kcw":2, "art":3, "hxm":4, "qrt":5, "pad":6, "hoy":7}u xkdi u kcwi u arti u hxmi u qrti u padi u hoyi t object_pairs_hookc S s | S( ( ( t x( ( sC /usr/lib64/python2.6/site-packages/simplejson/tests/test_unicode.pyt
B s t object_hookc S s d S( N( t None( R# ( ( sC /usr/lib64/python2.6/site-packages/simplejson/tests/test_unicode.pyR$ I s ( u xkdi ( u kcwi ( u arti ( u hxmi ( u qrti ( u padi ( u hoyi ( R R R t evalt OrderedDictt type( R R t pt od( ( sC /usr/lib64/python2.6/site-packages/simplejson/tests/test_unicode.pyt# test_object_pairs_hook_with_unicode= s " c C s- | i t i d i d ƒ ƒ h d d 6ƒ d S( Nu {"a": "é"}s utf-8u ét a( R R R R
( R ( ( sC /usr/lib64/python2.6/site-packages/simplejson/tests/test_unicode.pyt test_default_encodingM s c C se | i t t i d ƒ ƒ t ƒ | i t t i d ƒ ƒ t ƒ | i t t i d ƒ d ƒ t ƒ d S( Nu ""u "a"u ["a"]i ( R R) R R R ( R ( ( sC /usr/lib64/python2.6/site-packages/simplejson/tests/test_unicode.pyt test_unicode_preservationQ s c C s˜ | i t t i g d t ƒƒ t ƒ | i t t i d d t ƒƒ t ƒ | i t t i h d t ƒƒ t ƒ | i t t i d d t ƒƒ t ƒ d S( NR i t ( R R) R R R R ( R ( ( sC /usr/lib64/python2.6/site-packages/simplejson/tests/test_unicode.pyt' test_ensure_ascii_false_returns_unicodeV s %%%c C s¦ h t d ƒ d 6} h t d ƒ d 6} d } d } | i t i | ƒ | ƒ | i t i | ƒ | ƒ | i t i | d t ƒ| ƒ | i t i | d t ƒ| ƒ d S( Ns Arrêt sur imagesu quuxs Arrêt sur imagess! {"quux": "Arr\u00eat sur images"}u {"quux": "Arrêt sur images"}R ( R R R R R R ( R t doc1t doc2t doc_asciit doc_unicode( ( sC /usr/lib64/python2.6/site-packages/simplejson/tests/test_unicode.pyt+ test_ensure_ascii_false_bytestring_encoding] s c C s d } | i d ƒ } d } | i t i | ƒ | ƒ | i t i | ƒ | ƒ | i t i | d t ƒ| ƒ | i t i | d t ƒ| ƒ d S( Nu 

t utf8s "\u2029\u2028"R ( R
R R R R ( R t s1t s2t expect( ( sC /usr/lib64/python2.6/site-packages/simplejson/tests/test_unicode.pyt$ test_ensure_ascii_linebreak_encodingh s c C sÁ | i t i t i d ƒ | i t i t i d ƒ | i t i t i d ƒ | i t i t i d ƒ | i t i t i d ƒ | i t i t i d ƒ | i t i t i d ƒ | i t i t i d ƒ | i t i t i d ƒ t i d
j oÌ | i t i t i d ƒ | i t i t i d ƒ | i t i t i d
ƒ | i t i t i d ƒ | i t i t i d ƒ | i t i t i d ƒ | i t i t i d ƒ | i t i t i d ƒ n d S( Ns "\us "\u1s "\u12s "\u123s "\u1234s "\u123x"s "\u12x4"s "\u1x34"s "\ux234"iÿÿ s
"\ud800\u"s "\ud800\u0"s "\ud800\u00"s
"\ud800\u000"s "\ud800\u000x"s "\ud800\u00x0"s "\ud800\u0x00"s "\ud800\ux000"( t assertRaisesR t JSONDecodeErrorR t syst
maxunicode( R ( ( sC /usr/lib64/python2.6/site-packages/simplejson/tests/test_unicode.pyt test_invalid_escape_sequencesr s$ c C s| xH t t t d d ƒ ƒ D]. } | i t i | d t ƒt i | ƒ ƒ q Wd } | i t i | d t ƒd | d ƒ d S( Ni i R u ☃R ( t mapR R R R R R ( R t ct snowman( ( sC /usr/lib64/python2.6/site-packages/simplejson/tests/test_unicode.pyt test_ensure_ascii_still_works‰ s c C s~ d } t i t t i | ƒ ƒ } | i t i t | ƒ ƒ | ƒ x6 | | i d ƒ f D] } | i t i | ƒ | ƒ qW Wd S( Nu ã“ã‚“ã«ã¡ã‚R7 (
t codecst BOM_UTF8R R R R t loadR t decodeR ( R t contentt json_doct doc( ( sC /usr/lib64/python2.6/site-packages/simplejson/tests/test_unicode.pyt test_strip_bom” s ( t __name__t
__module__R R R R R R R R R! R, R. R/ R1 R6 R; R@ RD RL ( ( ( sC /usr/lib64/python2.6/site-packages/simplejson/tests/test_unicode.pyR s$
(
R> RE t unittestR t
simplejsonR t simplejson.compatR R R R R R ( ( ( sC /usr/lib64/python2.6/site-packages/simplejson/tests/test_unicode.pyt s
(