%PDF- %PDF-
Direktori : /opt/alt/python27/lib64/python2.7/site-packages/simplejson/tests/ |
Current File : //opt/alt/python27/lib64/python2.7/site-packages/simplejson/tests/test_unicode.pyo |
� k��Mc @ s6 d d l m Z d d l Z d e f d � � YZ d S( i����( t TestCaseNt 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 RS( c C sY t j d d � } d } | j d � } | j | � } | j | � } | j | | � d S( Nt encodings utf-8u αΩ( t jsont JSONEncodert encodet assertEquals( t selft encodert ut st jut js( ( sP /opt/alt/python27/lib64/python2.7/site-packages/simplejson/tests/test_unicode.pyt test_encoding1 s c C sS d } | j d � } t j | d d �} t j | d d �} | j | | � d S( Nu αΩs utf-8R ( R R t dumpsR ( R R R R R ( ( sP /opt/alt/python27/lib64/python2.7/site-packages/simplejson/tests/test_unicode.pyt test_encoding2 s c C s) d } t j | � } | j | d � d S( Nu αΩs "\u03b1\u03a9"( R R R ( R R t j( ( sP /opt/alt/python27/lib64/python2.7/site-packages/simplejson/tests/test_unicode.pyt test_encoding3 s c C s, d } t j | g � } | j | d � d S( Nu αΩs ["\u03b1\u03a9"]( R R R ( R R R ( ( sP /opt/alt/python27/lib64/python2.7/site-packages/simplejson/tests/test_unicode.pyt test_encoding4 s c C s7 d } t j | d t �} | j | d | d � d S( Nu αΩt ensure_asciiu "( R R t FalseR ( R R R ( ( sP /opt/alt/python27/lib64/python2.7/site-packages/simplejson/tests/test_unicode.pyt test_encoding5 s c C s: d } t j | g d t �} | j | d | d � d S( Nu αΩR u ["u "]( R R R R ( R R R ( ( sP /opt/alt/python27/lib64/python2.7/site-packages/simplejson/tests/test_unicode.pyt test_encoding6$ s c C sB d } | j t j | � d � | j t j | d t �d � d S( Nu 𝄠s "\ud834\udd20"R u "𝄠"( R R R R ( R R ( ( sP /opt/alt/python27/lib64/python2.7/site-packages/simplejson/tests/test_unicode.pyt test_big_unicode_encode) s c C sD d } | j t j d | d � | � | j t j d � | � d S( Nu z𝄠xt "s "z\ud834\udd20x"( R R t loads( R R ( ( sP /opt/alt/python27/lib64/python2.7/site-packages/simplejson/tests/test_unicode.pyt test_big_unicode_decode. s !c C sP xI t d d � D]8 } t | � } d | f } | j t j | � | � q Wd S( Ni i�� s "\u%04x"( t ranget unichrR R R ( R t iR R ( ( sP /opt/alt/python27/lib64/python2.7/site-packages/simplejson/tests/test_unicode.pyt test_unicode_decode3 s c C s� d } d d d d d d d g } | j t j | � t | � � | j t j | d d � �| � t j | d t j �} | j | t j | � � | j t | � t j � | j t j | d t j d d � �t j | � � 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( N( ( t x( ( sP /opt/alt/python27/lib64/python2.7/site-packages/simplejson/tests/test_unicode.pyt <lambda>? s t object_hookc S s d S( N( t None( R ( ( sP /opt/alt/python27/lib64/python2.7/site-packages/simplejson/tests/test_unicode.pyR! F s ( u xkdi ( u kcwi ( u arti ( u hxmi ( u qrti ( u padi ( u hoyi ( t assertEqualR R t evalt OrderedDictt type( R R t pt od( ( sP /opt/alt/python27/lib64/python2.7/site-packages/simplejson/tests/test_unicode.pyt# test_object_pairs_hook_with_unicode: s " c C s- | j t j d j d � � i d d 6� d S( Nu {"a": "é"}s utf-8u ét a( R R R R ( R ( ( sP /opt/alt/python27/lib64/python2.7/site-packages/simplejson/tests/test_unicode.pyt test_default_encodingJ s c C se | j t t j d � � t � | j t t j d � � t � | j t t j d � d � t � d S( Nu ""u "a"u ["a"]i ( R R'