%PDF- %PDF-
Direktori : /usr/local/lib/python2.7/test/ |
Current File : //usr/local/lib/python2.7/test/multibytecodec_support.pyc |
ó Nêáac @ s¥ d d l Z d d l Z d d l Z d d l Z d d l Z d d l m Z d d l m Z d d l m Z d d d „ ƒ YZ d e j f d „ ƒ YZ d „ Z d S( iÿÿÿÿN( t HTTPException( t test_support( t StringIOt TestBasec 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 d „ Z d „ Z d „ Z d „ Z d „ Z d „ Z RS( t i i u í»®c C s… | j d k r' t j | j ƒ | _ n | j j | _ | j j | _ | j j | _ | j j | _ | j j | _ | j j | _ d S( N( t codect Nonet codecst lookupt encodingt encodet decodet streamreadert readert streamwritert writert incrementalencodert incrementaldecoder( t self( ( s7 /usr/local/lib/python2.7/test/multibytecodec_support.pyt setUp s c C s˜ x‘ t g | j D] } t | ƒ j ƒ ^ q Œ D]a \ } } | j | ƒ d } | j | | j d ƒ ƒ | j r/ | j | | j | ƒ d ƒ q/ q/ Wd S( Ni s utf-8( t zipt tstringR t readlinesR t assertEqualt roundtriptestR ( R t ft nativet utf8t u( ( s7 /usr/local/lib/python2.7/test/multibytecodec_support.pyt test_chunkcoding# s 2 c C s x| j D] \ } } } t | t ƒ r4 | j } n | j } | r| | | ƒ d } | | j k r³ | j t | ƒ t k t | ƒ ƒ | j | | d | | j | | | f ƒ q| j t | ƒ t k t | ƒ ƒ | j | | d | | j | | | f ƒ q | j t | | | ƒ q Wd S( Ni s %r.decode(%r, %r)=%r != %rs %r.encode(%r, %r)=%r != %r( t codectestst isinstancet bytesR R t assertTruet typet unicodeR R t assertRaisest UnicodeError( R t sourcet schemet expectedt funct result( ( s7 /usr/local/lib/python2.7/test/multibytecodec_support.pyt test_errorhandle+ s$ ""c C sC | j r | j d ƒ n d } | j | j | d ƒ d d ƒ d S( Ns$ encoding contains full ISO 10646 mapu ଓଣà nd eggst xmlcharrefreplacei s ଓଣୠ nd eggs( t has_iso10646t skipTestR R ( R t s( ( s7 /usr/local/lib/python2.7/test/multibytecodec_support.pyt test_xmlcharrefreplaceB s c s“ | j r | j d ƒ n d d l m ‰ ‡ f d † } t j d | ƒ | j rc | j \ } } n d } d } | j | j | d ƒ d | ƒ d S( Ns$ encoding contains full ISO 10646 mapiÿÿÿÿ( t codepoint2namec s¦ t | t ƒ s"