ó
‹wÛjc           @   sg  d  d l  m Z m Z m Z m Z m Z m Z y e ƒ  Wn e k
 rX e d ƒ ‚ n Xd  d l m	 Z	 m
 Z
 m Z m Z m Z m Z d  d l m Z d  d l m Z d  d l m Z m Z m Z d  d l m Z d  d l Z d  d l Z d  d l Z d  d l Z d  d l j Z  d  d	 l m! Z! m" Z" m# Z# d  d l$ Z$ e! d
 d d ƒZ% e! d d d ƒZ& e' Z( e j) j( r®y e  j* j+ e  j, ƒ Wn  e- e. e/ f k
 rªe0 Z( n Xn  e$ j1 e( d ƒ Z2 d Z3 d e$ j4 f d „  ƒ  YZ5 e6 d „ Z7 e8 d „ Z9 e8 d „ Z: d e$ j4 f d „  ƒ  YZ; d e$ j4 f d „  ƒ  YZ< d e$ j4 f d „  ƒ  YZ= d e$ j4 f d „  ƒ  YZ> d Z? d f  d „  ƒ  YZ@ d  e@ e$ j4 f d! „  ƒ  YZA d" e@ e$ j4 f d# „  ƒ  YZB d$ e@ e$ j4 f d% „  ƒ  YZC d& e$ j4 f d' „  ƒ  YZD eE e& ƒ jF ƒ  ZG d( e5 f d) „  ƒ  YZH d* e$ j4 f d+ „  ƒ  YZI d, e5 f d- „  ƒ  YZJ d. „  ZK eL d/ k rceK ƒ  n  d S(0   iÿÿÿÿ(   t   make_parsert   ContentHandlert   SAXExceptiont   SAXReaderNotAvailablet   SAXParseExceptiont   saxutilss   no XML parsers available(   t   XMLGeneratort   escapet   unescapet	   quoteattrt   XMLFilterBaset   prepare_input_source(   t   create_parser(   t   feature_namespaces(   t   InputSourcet   AttributesImplt   AttributesNSImpl(   t   StringION(   t   findfilet   run_unittestt   TESTFNs   test.xmlt   subdirt   xmltestdatas   test.xml.outs"   Requires unicode filenames supports%   http://www.python.org/xml-ns/saxtest/t   XmlTestBasec           B   s#   e  Z d  „  Z d „  Z d „  Z RS(   c         C   sW  |  j  t | j d ƒ |  j  t | j d ƒ |  j  t | j d ƒ |  j  t | j d ƒ |  j  t | j d ƒ |  j | j ƒ  d ƒ |  j | j	 ƒ  g  ƒ |  j | j
 ƒ  g  ƒ |  j t | ƒ d ƒ |  j | j d ƒ ƒ |  j | j ƒ  g  ƒ |  j | j d ƒ d  ƒ |  j | j d d ƒ d ƒ |  j | j ƒ  g  ƒ |  j | j ƒ  g  ƒ d  S(   Nt   attri    t   attrsi   (   t   assertRaisest   KeyErrort   getValuet   getValueByQNamet   getNameByQNamet   getQNameByNamet   __getitem__t   assertEqualt	   getLengtht   getNamest	   getQNamest   lent   assertFalset   has_keyt   keyst   gett   Nonet   itemst   values(   t   selfR   (    (    sƒ   /home/sim/yocto/scarthgap/build/tmp/work/x86_64-linux/python-native/2.7.18/recipe-sysroot-native/usr/lib/python2.7/test/test_sax.pyt   verify_empty_attrs,   s    c         C   s{  |  j  t | j t d f ƒ |  j  t | j d ƒ |  j  t | j d ƒ |  j  t | j t d f ƒ |  j  t | j t d f ƒ |  j | j	 ƒ  d ƒ |  j | j
 ƒ  g  ƒ |  j | j ƒ  g  ƒ |  j t | ƒ d ƒ |  j | j t d f ƒ ƒ |  j | j ƒ  g  ƒ |  j | j t d f ƒ d  ƒ |  j | j t d f d ƒ d ƒ |  j | j ƒ  g  ƒ |  j | j ƒ  g  ƒ d  S(   NR   s   ns:attri    i   (   R   R   R   t   ns_uriR   R   R   R    R!   R"   R#   R$   R%   R&   R'   R(   R)   R*   R+   R,   (   R-   R   (    (    sƒ   /home/sim/yocto/scarthgap/build/tmp/work/x86_64-linux/python-native/2.7.18/recipe-sysroot-native/usr/lib/python2.7/test/test_sax.pyt   verify_empty_nsattrs=   s    "c         C   sp  |  j  | j ƒ  d ƒ |  j  | j ƒ  d g ƒ |  j  | j ƒ  d g ƒ |  j  t | ƒ d ƒ |  j | j d ƒ ƒ |  j  | j ƒ  d g ƒ |  j  | j d ƒ d ƒ |  j  | j d d ƒ d ƒ |  j  | j	 ƒ  d g ƒ |  j  | j
 ƒ  d g ƒ |  j  | j d ƒ d ƒ |  j  | j d ƒ d ƒ |  j  | j d ƒ d ƒ |  j  | d d ƒ |  j  | j d ƒ d ƒ d  S(   Ni   R   t   vali   (   R   R1   (   R!   R"   R#   R$   R%   t
   assertTrueR'   R(   R)   R+   R,   R   R   R   R   (   R-   R   (    (    sƒ   /home/sim/yocto/scarthgap/build/tmp/work/x86_64-linux/python-native/2.7.18/recipe-sysroot-native/usr/lib/python2.7/test/test_sax.pyt   verify_attrs_wattrN   s    (   t   __name__t
   __module__R.   R0   R3   (    (    (    sƒ   /home/sim/yocto/scarthgap/build/tmp/work/x86_64-linux/python-native/2.7.18/recipe-sysroot-native/usr/lib/python2.7/test/test_sax.pyR   +   s   		c         C   s   | d  k r |  Sd | |  f S(   Nu&   <?xml version="1.0" encoding="%s"?>
%s(   R*   (   t   doct   encoding(    (    sƒ   /home/sim/yocto/scarthgap/build/tmp/work/x86_64-linux/python-native/2.7.18/recipe-sysroot-native/usr/lib/python2.7/test/test_sax.pyt   xml_unicode`   s    c         C   s.   | t  k r | } n  t |  | ƒ j | d ƒ S(   Nt   xmlcharrefreplace(   t   EllipsisR8   t   encode(   R6   R7   t   decl_encoding(    (    sƒ   /home/sim/yocto/scarthgap/build/tmp/work/x86_64-linux/python-native/2.7.18/recipe-sysroot-native/usr/lib/python2.7/test/test_sax.pyt	   xml_bytese   s    	c         C   sV   | t  k r | } n  t j t d d | d d ƒ� } | j t |  | ƒ ƒ Wd  QXd  S(   Nt   wR7   t   errorsR9   (   R:   t   iot   openR   t   writeR8   (   R6   R7   R<   t   f(    (    sƒ   /home/sim/yocto/scarthgap/build/tmp/work/x86_64-linux/python-native/2.7.18/recipe-sysroot-native/usr/lib/python2.7/test/test_sax.pyt   make_xml_filej   s    	!t	   ParseTestc           B   sV   e  Z e j d  ƒ Z d „  Z d „  Z d „  Z d „  Z d „  Z	 d „  Z
 d „  Z RS(   sB   <money value="$\xa3\u20ac\U0001017b">$\xa3\u20ac\U0001017b</money>c         C   s   t  j t ƒ d  S(   N(   t   supportt   unlinkR   (   R-   (    (    sƒ   /home/sim/yocto/scarthgap/build/tmp/work/x86_64-linux/python-native/2.7.18/recipe-sysroot-native/usr/lib/python2.7/test/test_sax.pyt   tearDownu   s    c         C   sU   d d l  m } t ƒ  } | | t | d ƒ ƒ |  j | j ƒ  t |  j d ƒ ƒ d  S(   Niÿÿÿÿ(   t   parses   utf-8(   t   xml.saxRI   R   R   R!   t   getvalueR=   t   data(   R-   RC   RI   t   result(    (    sƒ   /home/sim/yocto/scarthgap/build/tmp/work/x86_64-linux/python-native/2.7.18/recipe-sysroot-native/usr/lib/python2.7/test/test_sax.pyt   check_parsex   s    	c         C   sß  d	 } xâ | D]Ú } |  j  t j t |  j | ƒ ƒ ƒ t |  j | ƒ |  j  t ƒ t j t d ƒ � } |  j  | ƒ Wd  QX|  j  t j t |  j | d  ƒ ƒ ƒ t |  j | d  ƒ |  j  t ƒ t j t d ƒ � } |  j  | ƒ Wd  QXq W|  j  t j t |  j d d ƒ ƒ ƒ t |  j d d ƒ |  j  t ƒ t j t d ƒ � } |  j  | ƒ Wd  QX|  j  t j t |  j d d  ƒ ƒ ƒ t |  j d d  ƒ |  j  t ƒ t j t d ƒ � } |  j  | ƒ Wd  QX|  j  t j t |  j d ƒ ƒ ƒ t |  j d ƒ |  j  t ƒ t j t d ƒ � } |  j  | ƒ Wd  QX|  j	 t
 ƒ �* |  j  t j t |  j d d  ƒ ƒ ƒ Wd  QXt |  j d d  ƒ |  j	 t
 ƒ � |  j  t ƒ Wd  QXt j t d ƒ �* } |  j	 t
 ƒ � |  j  | ƒ Wd  QXWd  QXd  S(
   Ns   us-asciis   utf-8s   utf-16s   utf-16les   utf-16bet   rbs	   utf-8-sigs
   iso-8859-1(   s   us-asciis   utf-8s   utf-16s   utf-16les   utf-16be(   RN   R@   t   BytesIOR=   RL   RD   R   RA   R*   R   R   (   R-   t	   encodingsR7   RC   (    (    sƒ   /home/sim/yocto/scarthgap/build/tmp/work/x86_64-linux/python-native/2.7.18/recipe-sysroot-native/usr/lib/python2.7/test/test_sax.pyt   test_parse_bytes~   sF    "%%%"+c         C   sb   t  |  j d d  ƒ t j t d ƒ �7 } t ƒ  } | j | ƒ | j d ƒ |  j	 | ƒ Wd  QXd  S(   Ns
   iso-8859-1RO   (
   RD   RL   R*   R@   RA   R   R   t   setByteStreamt   setEncodingRN   (   R-   RC   t   input(    (    sƒ   /home/sim/yocto/scarthgap/build/tmp/work/x86_64-linux/python-native/2.7.18/recipe-sysroot-native/usr/lib/python2.7/test/test_sax.pyt   test_parse_InputSource¨   s    	c      
      s�   t  ‰  i d  d 6‰ ‡  ‡ f d †  } t j t d | ƒ �O t |  j d d  ƒ |  j t ƒ � |  j	 t
 ƒ Wd  QX|  j ˆ d j ƒ Wd  QXd  S(   Nt   fileobjc             s   ˆ  |  Œ  } | ˆ d <| S(   NRW   (    (   t   argsRW   (   t   builtin_opent	   non_local(    sƒ   /home/sim/yocto/scarthgap/build/tmp/work/x86_64-linux/python-native/2.7.18/recipe-sysroot-native/usr/lib/python2.7/test/test_sax.pyt	   mock_openµ   s    
RA   s
   iso-8859-1(   RA   R*   RF   t	   swap_attrR   RD   RL   R   R   RN   R   R2   t   closed(   R-   R[   (    (   RY   RZ   sƒ   /home/sim/yocto/scarthgap/build/tmp/work/x86_64-linux/python-native/2.7.18/recipe-sysroot-native/usr/lib/python2.7/test/test_sax.pyt   test_parse_close_source±   s    c         C   sU   d d l  m } t ƒ  } | | t | d ƒ ƒ |  j | j ƒ  t |  j d ƒ ƒ d  S(   Niÿÿÿÿ(   t   parseStrings   utf-8(   RJ   R_   R   R   R!   RK   R=   RL   (   R-   t   sR_   RM   (    (    sƒ   /home/sim/yocto/scarthgap/build/tmp/work/x86_64-linux/python-native/2.7.18/recipe-sysroot-native/usr/lib/python2.7/test/test_sax.pyt   check_parseStringÀ   s    	c      	   C   sÓ   d } xC | D]; } |  j  t |  j | ƒ ƒ |  j  t |  j | d  ƒ ƒ q W|  j  t |  j d d ƒ ƒ |  j  t |  j d d  ƒ ƒ |  j  t |  j d ƒ ƒ |  j t ƒ �! |  j  t |  j d d  ƒ ƒ Wd  QXd  S(	   Ns   us-asciis   utf-8s   utf-16s   utf-16les   utf-16bes	   utf-8-sigs
   iso-8859-1(   s   us-asciis   utf-8s   utf-16s   utf-16les   utf-16be(   Ra   R=   RL   R*   R   R   (   R-   RQ   R7   (    (    sƒ   /home/sim/yocto/scarthgap/build/tmp/work/x86_64-linux/python-native/2.7.18/recipe-sysroot-native/usr/lib/python2.7/test/test_sax.pyt   test_parseString_bytesÆ   s     (   R4   R5   RF   t   uRL   RH   RN   RR   RV   R^   Ra   Rb   (    (    (    sƒ   /home/sim/yocto/scarthgap/build/tmp/work/x86_64-linux/python-native/2.7.18/recipe-sysroot-native/usr/lib/python2.7/test/test_sax.pyRE   q   s   			*				t   MakeParserTestc           B   s   e  Z d  „  Z RS(   c         C   sš   d d l  m } | ƒ  } d d l  m } | ƒ  } d d l  m } | ƒ  } d d l  m } | ƒ  } d d l  m } | ƒ  } d d l  m } | ƒ  } d  S(   Niÿÿÿÿ(   R    (   RJ   R    (   R-   R    t   p(    (    sƒ   /home/sim/yocto/scarthgap/build/tmp/work/x86_64-linux/python-native/2.7.18/recipe-sysroot-native/usr/lib/python2.7/test/test_sax.pyt   test_make_parser2Ø   s    					(   R4   R5   Rf   (    (    (    sƒ   /home/sim/yocto/scarthgap/build/tmp/work/x86_64-linux/python-native/2.7.18/recipe-sysroot-native/usr/lib/python2.7/test/test_sax.pyRd   ×   s   t   SaxutilsTestc           B   st   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 RS(   c         C   s   |  j  t d ƒ d ƒ d  S(   Ns   Donald Duck & Cos   Donald Duck &amp; Co(   R!   R   (   R-   (    (    sƒ   /home/sim/yocto/scarthgap/build/tmp/work/x86_64-linux/python-native/2.7.18/recipe-sysroot-native/usr/lib/python2.7/test/test_sax.pyt   test_escape_basicò   s    c         C   s   |  j  t d ƒ d ƒ d  S(   Ns   <Donald Duck & Co>s   &lt;Donald Duck &amp; Co&gt;(   R!   R   (   R-   (    (    sƒ   /home/sim/yocto/scarthgap/build/tmp/work/x86_64-linux/python-native/2.7.18/recipe-sysroot-native/usr/lib/python2.7/test/test_sax.pyt   test_escape_allõ   s    c         C   s$   |  j  t d i d d 6ƒ d ƒ d  S(   Ns   Hei pÃ¥ degs   &aring;s   Ã¥s   Hei p&aring; deg(   R!   R   (   R-   (    (    sƒ   /home/sim/yocto/scarthgap/build/tmp/work/x86_64-linux/python-native/2.7.18/recipe-sysroot-native/usr/lib/python2.7/test/test_sax.pyt   test_escape_extraù   s    c         C   s   |  j  t d ƒ d ƒ d  S(   Ns   Donald Duck &amp; Cos   Donald Duck & Co(   R!   R   (   R-   (    (    sƒ   /home/sim/yocto/scarthgap/build/tmp/work/x86_64-linux/python-native/2.7.18/recipe-sysroot-native/usr/lib/python2.7/test/test_sax.pyt   test_unescape_basicþ   s    c         C   s   |  j  t d ƒ d ƒ d  S(   Ns   &lt;Donald Duck &amp; Co&gt;s   <Donald Duck & Co>(   R!   R   (   R-   (    (    sƒ   /home/sim/yocto/scarthgap/build/tmp/work/x86_64-linux/python-native/2.7.18/recipe-sysroot-native/usr/lib/python2.7/test/test_sax.pyt   test_unescape_all  s    c         C   s$   |  j  t d i d d 6ƒ d ƒ d  S(   Ns   Hei pÃ¥ degs   &aring;s   Ã¥s   Hei p&aring; deg(   R!   R   (   R-   (    (    sƒ   /home/sim/yocto/scarthgap/build/tmp/work/x86_64-linux/python-native/2.7.18/recipe-sysroot-native/usr/lib/python2.7/test/test_sax.pyt   test_unescape_extra  s    c         C   s$   |  j  t d i d d 6ƒ d ƒ d  S(   Ns	   &amp;foo;t   splats   &foo;(   R!   R   (   R-   (    (    sƒ   /home/sim/yocto/scarthgap/build/tmp/work/x86_64-linux/python-native/2.7.18/recipe-sysroot-native/usr/lib/python2.7/test/test_sax.pyt   test_unescape_amp_extra	  s    c         C   s   |  j  t d ƒ d ƒ d  S(   Ns   Donald Duck & Cos   "Donald Duck &amp; Co"(   R!   R	   (   R-   (    (    sƒ   /home/sim/yocto/scarthgap/build/tmp/work/x86_64-linux/python-native/2.7.18/recipe-sysroot-native/usr/lib/python2.7/test/test_sax.pyt   test_quoteattr_basic  s    c         C   s   |  j  t d ƒ d ƒ d  S(   Ns   Includes "double" quotess   'Includes "double" quotes'(   R!   R	   (   R-   (    (    sƒ   /home/sim/yocto/scarthgap/build/tmp/work/x86_64-linux/python-native/2.7.18/recipe-sysroot-native/usr/lib/python2.7/test/test_sax.pyt   test_single_quoteattr  s    c         C   s   |  j  t d ƒ d ƒ d  S(   Ns   Includes 'single' quotess   "Includes 'single' quotes"(   R!   R	   (   R-   (    (    sƒ   /home/sim/yocto/scarthgap/build/tmp/work/x86_64-linux/python-native/2.7.18/recipe-sysroot-native/usr/lib/python2.7/test/test_sax.pyt   test_double_quoteattr  s    c         C   s   |  j  t d ƒ d ƒ d  S(   Ns%   Includes 'single' and "double" quotess1   "Includes 'single' and &quot;double&quot; quotes"(   R!   R	   (   R-   (    (    sƒ   /home/sim/yocto/scarthgap/build/tmp/work/x86_64-linux/python-native/2.7.18/recipe-sysroot-native/usr/lib/python2.7/test/test_sax.pyt   test_single_double_quoteattr  s    c         C   s   t  d g ƒ } d  S(   Ns   xml.parsers.no_such_parser(   R    (   R-   Re   (    (    sƒ   /home/sim/yocto/scarthgap/build/tmp/work/x86_64-linux/python-native/2.7.18/recipe-sysroot-native/usr/lib/python2.7/test/test_sax.pyt   test_make_parser  s    (   R4   R5   Rh   Ri   Rj   Rk   Rl   Rm   Ro   Rp   Rq   Rr   Rs   Rt   (    (    (    sƒ   /home/sim/yocto/scarthgap/build/tmp/work/x86_64-linux/python-native/2.7.18/recipe-sysroot-native/usr/lib/python2.7/test/test_sax.pyRg   ð   s   											t   PrepareInputSourceTestc           B   sP   e  Z d  „  Z d „  Z d „  Z d „  Z d „  Z d „  Z d „  Z d „  Z	 RS(   c         C   s8   t  j |  _ t |  j d ƒ � } | j d ƒ Wd  QXd  S(   NR>   s   This was read from a file.(   RF   R   t   fileRA   RB   (   R-   t   tmp(    (    sƒ   /home/sim/yocto/scarthgap/build/tmp/work/x86_64-linux/python-native/2.7.18/recipe-sysroot-native/usr/lib/python2.7/test/test_sax.pyt   setUp&  s    c         C   s   t  j |  j ƒ d  S(   N(   RF   RG   Rv   (   R-   (    (    sƒ   /home/sim/yocto/scarthgap/build/tmp/work/x86_64-linux/python-native/2.7.18/recipe-sysroot-native/usr/lib/python2.7/test/test_sax.pyRH   +  s    c         C   s   t  j d ƒ S(   Ns   This is a byte stream.(   R@   RP   (   R-   (    (    sƒ   /home/sim/yocto/scarthgap/build/tmp/work/x86_64-linux/python-native/2.7.18/recipe-sysroot-native/usr/lib/python2.7/test/test_sax.pyt   make_byte_stream.  s    c         C   s1   |  j  | ƒ |  j | j ƒ  | ƒ | j ƒ  d  S(   N(   t   assertIsNotNoneR!   t   readt   close(   R-   t   streamt   content(    (    sƒ   /home/sim/yocto/scarthgap/build/tmp/work/x86_64-linux/python-native/2.7.18/recipe-sysroot-native/usr/lib/python2.7/test/test_sax.pyt   checkContent1  s    c         C   s[   t  |  j ƒ } | j |  j ƒ  ƒ t | ƒ } |  j | j ƒ  ƒ |  j | j ƒ  d ƒ d  S(   Ns   This is a byte stream.(	   R   Rv   RS   Ry   R   t   assertIsNonet   getCharacterStreamR   t   getByteStream(   R-   t   srct   prep(    (    sƒ   /home/sim/yocto/scarthgap/build/tmp/work/x86_64-linux/python-native/2.7.18/recipe-sysroot-native/usr/lib/python2.7/test/test_sax.pyt   test_byte_stream7  s    c         C   sH   t  |  j ƒ } t | ƒ } |  j | j ƒ  ƒ |  j | j ƒ  d ƒ d  S(   Ns   This was read from a file.(   R   Rv   R   R€   R�   R   R‚   (   R-   Rƒ   R„   (    (    sƒ   /home/sim/yocto/scarthgap/build/tmp/work/x86_64-linux/python-native/2.7.18/recipe-sysroot-native/usr/lib/python2.7/test/test_sax.pyt   test_system_idA  s
    c         C   s<   t  |  j ƒ } |  j | j ƒ  ƒ |  j | j ƒ  d ƒ d  S(   Ns   This was read from a file.(   R   Rv   R€   R�   R   R‚   (   R-   R„   (    (    sƒ   /home/sim/yocto/scarthgap/build/tmp/work/x86_64-linux/python-native/2.7.18/recipe-sysroot-native/usr/lib/python2.7/test/test_sax.pyt   test_stringJ  s    c         C   s?   t  |  j ƒ  ƒ } |  j | j ƒ  ƒ |  j | j ƒ  d ƒ d  S(   Ns   This is a byte stream.(   R   Ry   R€   R�   R   R‚   (   R-   R„   (    (    sƒ   /home/sim/yocto/scarthgap/build/tmp/work/x86_64-linux/python-native/2.7.18/recipe-sysroot-native/usr/lib/python2.7/test/test_sax.pyt   test_binary_fileQ  s    (
   R4   R5   Rx   RH   Ry   R   R…   R†   R‡   Rˆ   (    (    (    sƒ   /home/sim/yocto/scarthgap/build/tmp/work/x86_64-linux/python-native/2.7.18/recipe-sysroot-native/usr/lib/python2.7/test/test_sax.pyRu   $  s   					
			s,   <?xml version="1.0" encoding="iso-8859-1"?>
t
   XmlgenTestc           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 RS(   c         C   sg   |  j  ƒ  } t | ƒ } | j ƒ  | j d i  ƒ | j d ƒ | j ƒ  |  j | j ƒ  t d ƒ d  S(   NR6   s   <doc></doc>(	   t   ioclassR   t   startDocumentt   startElementt
   endElementt   endDocumentR!   RK   t   start(   R-   RM   t   gen(    (    sƒ   /home/sim/yocto/scarthgap/build/tmp/work/x86_64-linux/python-native/2.7.18/recipe-sysroot-native/usr/lib/python2.7/test/test_sax.pyt   test_xmlgen_basic_  s    

c         C   st   |  j  ƒ  } t | ƒ } | j ƒ  | j d i  ƒ | j d ƒ | j d ƒ | j ƒ  |  j | j ƒ  t	 d ƒ d  S(   NR6   t   huheis   <doc>huhei</doc>(
   RŠ   R   R‹   RŒ   t
   charactersR�   RŽ   R!   RK   R�   (   R-   RM   R�   (    (    sƒ   /home/sim/yocto/scarthgap/build/tmp/work/x86_64-linux/python-native/2.7.18/recipe-sysroot-native/usr/lib/python2.7/test/test_sax.pyt   test_xmlgen_contenti  s    

c         C   sw   |  j  ƒ  } t | ƒ } | j ƒ  | j d d ƒ | j d i  ƒ | j d ƒ | j ƒ  |  j | j ƒ  t	 d ƒ d  S(   Nt   testRL   R6   s   <?test data?><doc></doc>(
   RŠ   R   R‹   t   processingInstructionRŒ   R�   RŽ   R!   RK   R�   (   R-   RM   R�   (    (    sƒ   /home/sim/yocto/scarthgap/build/tmp/work/x86_64-linux/python-native/2.7.18/recipe-sysroot-native/usr/lib/python2.7/test/test_sax.pyt   test_xmlgen_piu  s    

c         C   st   |  j  ƒ  } t | ƒ } | j ƒ  | j d i  ƒ | j d ƒ | j d ƒ | j ƒ  |  j | j ƒ  t	 d ƒ d  S(   NR6   s   <huhei&s   <doc>&lt;huhei&amp;</doc>(
   RŠ   R   R‹   RŒ   R“   R�   RŽ   R!   RK   R�   (   R-   RM   R�   (    (    sƒ   /home/sim/yocto/scarthgap/build/tmp/work/x86_64-linux/python-native/2.7.18/recipe-sysroot-native/usr/lib/python2.7/test/test_sax.pyt   test_xmlgen_content_escape�  s    

c         C   sÚ   |  j  ƒ  } t | ƒ } | j ƒ  | j d i d d 6ƒ | j d i d d 6ƒ | j d ƒ | j d i d d 6ƒ | j d ƒ | j d i d d 6ƒ | j d ƒ | j d ƒ | j ƒ  |  j | j ƒ  t d ƒ d  S(	   NR6   t   "t   at   et   's   '"s   
	sK   <doc a='"'><e a="'"></e><e a="'&quot;"></e><e a="&#10;&#13;&#9;"></e></doc>(	   RŠ   R   R‹   RŒ   R�   RŽ   R!   RK   R�   (   R-   RM   R�   (    (    sƒ   /home/sim/yocto/scarthgap/build/tmp/work/x86_64-linux/python-native/2.7.18/recipe-sysroot-native/usr/lib/python2.7/test/test_sax.pyt   test_xmlgen_attr_escapeŽ  s    

c         C   s¤   d } x— | D]� } |  j  ƒ  } t | d | ƒ} | j ƒ  | j d i d	 d
 6ƒ | j d	 ƒ | j d ƒ | j ƒ  |  j | j ƒ  d | j	 | d ƒ ƒ q Wd  S(   Ns   iso-8859-15s   utf-8s   utf-16bes   utf-16les   utf-32bes   utf-32leR7   R6   u   â‚¬Rš   u:   <?xml version="1.0" encoding="%s"?>
<doc a="â‚¬">â‚¬</doc>R9   (   s   iso-8859-15s   utf-8s   utf-16bes   utf-16les   utf-32bes   utf-32le(
   RŠ   R   R‹   RŒ   R“   R�   RŽ   R!   RK   R;   (   R-   RQ   R7   RM   R�   (    (    sƒ   /home/sim/yocto/scarthgap/build/tmp/work/x86_64-linux/python-native/2.7.18/recipe-sysroot-native/usr/lib/python2.7/test/test_sax.pyt   test_xmlgen_encoding¢  s      

c         C   s}   |  j  ƒ  } t | d d ƒ} | j ƒ  | j d i d d 6ƒ | j d ƒ | j d ƒ | j ƒ  |  j | j ƒ  d ƒ d  S(   NR7   t   asciiR6   u   â‚¬Rš   sE   <?xml version="1.0" encoding="ascii"?>
<doc a="&#8364;">&#8364;</doc>(	   RŠ   R   R‹   RŒ   R“   R�   RŽ   R!   RK   (   R-   RM   R�   (    (    sƒ   /home/sim/yocto/scarthgap/build/tmp/work/x86_64-linux/python-native/2.7.18/recipe-sysroot-native/usr/lib/python2.7/test/test_sax.pyt   test_xmlgen_unencodableµ  s    

c         C   st   |  j  ƒ  } t | ƒ } | j ƒ  | j d i  ƒ | j d ƒ | j d ƒ | j ƒ  |  j | j ƒ  t	 d ƒ d  S(   NR6   t    s   <doc> </doc>(
   RŠ   R   R‹   RŒ   t   ignorableWhitespaceR�   RŽ   R!   RK   R�   (   R-   RM   R�   (    (    sƒ   /home/sim/yocto/scarthgap/build/tmp/work/x86_64-linux/python-native/2.7.18/recipe-sysroot-native/usr/lib/python2.7/test/test_sax.pyt   test_xmlgen_ignorableÃ  s    

c         C   sÃ   d } x¶ | D]® } |  j  ƒ  } t | d | ƒ} | j ƒ  | j d i d	 d
 6ƒ | j d	 j | ƒ ƒ | j d j | ƒ ƒ | j d ƒ | j ƒ  |  j	 | j
 ƒ  d | j | d ƒ ƒ q Wd  S(   Ns   iso-8859-15s   utf-8s   utf-16bes   utf-16les   utf-32bes   utf-32leR7   R6   u   â‚¬Rš   R¡   u;   <?xml version="1.0" encoding="%s"?>
<doc a="â‚¬">â‚¬ </doc>R9   (   s   iso-8859-15s   utf-8s   utf-16bes   utf-16les   utf-32bes   utf-32le(   RŠ   R   R‹   RŒ   R“   R;   R¢   R�   RŽ   R!   RK   (   R-   RQ   R7   RM   R�   (    (    sƒ   /home/sim/yocto/scarthgap/build/tmp/work/x86_64-linux/python-native/2.7.18/recipe-sysroot-native/usr/lib/python2.7/test/test_sax.pyt   test_xmlgen_encoding_bytesÏ  s       

c         C   s½   |  j  ƒ  } t | ƒ } | j ƒ  | j d t ƒ | j t d f d i  ƒ | j d d  i  ƒ | j d d  ƒ | j t d f d ƒ | j d ƒ | j	 ƒ  |  j
 | j ƒ  t d t ƒ d  S(   Nt   ns1R6   s   ns1:doct   udocs/   <ns1:doc xmlns:ns1="%s"><udoc></udoc></ns1:doc>(   NR¦   (   NR¦   (   RŠ   R   R‹   t   startPrefixMappingR/   t   startElementNSR*   t   endElementNSt   endPrefixMappingRŽ   R!   RK   R�   (   R-   RM   R�   (    (    sƒ   /home/sim/yocto/scarthgap/build/tmp/work/x86_64-linux/python-native/2.7.18/recipe-sysroot-native/usr/lib/python2.7/test/test_sax.pyt   test_xmlgen_nsã  s    

c         C   st   |  j  ƒ  } t | ƒ } | j ƒ  | j d d i d d 6ƒ | j d d ƒ | j ƒ  |  j | j ƒ  t	 d ƒ d  S(   NRš   t   ct   bs   <a b="c"></a>(   NRš   (   NR­   (   NRš   (
   RŠ   R   R‹   R¨   R*   R©   RŽ   R!   RK   R�   (   R-   RM   R�   (    (    sƒ   /home/sim/yocto/scarthgap/build/tmp/work/x86_64-linux/python-native/2.7.18/recipe-sysroot-native/usr/lib/python2.7/test/test_sax.pyt   test_1463026_1õ  s    

c         C   sŠ   |  j  ƒ  } t | ƒ } | j ƒ  | j d  d ƒ | j d d i  ƒ | j d d ƒ | j d  ƒ | j ƒ  |  j	 | j
 ƒ  t d ƒ d  S(   Nt   quxRš   s   <a xmlns="qux"></a>(   R¯   Rš   (   R¯   Rš   (   RŠ   R   R‹   R§   R*   R¨   R©   Rª   RŽ   R!   RK   R�   (   R-   RM   R�   (    (    sƒ   /home/sim/yocto/scarthgap/build/tmp/work/x86_64-linux/python-native/2.7.18/recipe-sysroot-native/usr/lib/python2.7/test/test_sax.pyt   test_1463026_2   s    

c         C   s‘   |  j  ƒ  } t | ƒ } | j ƒ  | j d d ƒ | j d d i d d 6ƒ | j d	 d ƒ | j d ƒ | j ƒ  |  j	 | j
 ƒ  t d ƒ d  S(
   Nt   myR¯   Rš   R¬   R­   s"   <my:a xmlns:my="qux" b="c"></my:a>(   R¯   Rš   (   NR­   (   R¯   Rš   (   RŠ   R   R‹   R§   R¨   R*   R©   Rª   RŽ   R!   RK   R�   (   R-   RM   R�   (    (    sƒ   /home/sim/yocto/scarthgap/build/tmp/work/x86_64-linux/python-native/2.7.18/recipe-sysroot-native/usr/lib/python2.7/test/test_sax.pyt   test_1463026_3  s    

c         C   su   t  d ƒ } t ƒ  } | j t t ƒ |  j ƒ  } t | ƒ } | j | ƒ | j | ƒ |  j	 | j
 ƒ  t d ƒ d  S(   Nsb   <?xml version="1.0"?><a:g1 xmlns:a="http://example.com/ns"><a:g2 xml:lang="en">Hello</a:g2></a:g1>sM   <a:g1 xmlns:a="http://example.com/ns"><a:g2 xml:lang="en">Hello</a:g2></a:g1>(   R   R    t
   setFeatureR   t   TrueRŠ   R   t   setContentHandlerRI   R!   RK   R�   (   R-   t   test_xmlt   parserRM   R�   (    (    sƒ   /home/sim/yocto/scarthgap/build/tmp/work/x86_64-linux/python-native/2.7.18/recipe-sysroot-native/usr/lib/python2.7/test/test_sax.pyt   test_5027_1  s    		c         C   sÇ   |  j  ƒ  } t | ƒ } | j ƒ  | j d d ƒ | j d
 d i  ƒ i d d 6} | j d d | ƒ | j d ƒ | j d d ƒ | j d d ƒ | j d ƒ | j ƒ  |  j	 | j
 ƒ  t d	 ƒ d  S(   NRš   s   http://example.com/nst   g1t   ens$   http://www.w3.org/XML/1998/namespacet   langt   g2t   HellosM   <a:g1 xmlns:a="http://example.com/ns"><a:g2 xml:lang="en">Hello</a:g2></a:g1>(   s   http://example.com/nsR¹   (   s$   http://www.w3.org/XML/1998/namespaceR»   (   s   http://example.com/nsR¼   (   s   http://example.com/nsR¼   (   s   http://example.com/nsR¹   (   RŠ   R   R‹   R§   R¨   R“   R©   Rª   RŽ   R!   RK   R�   (   R-   RM   R�   t	   lang_attr(    (    sƒ   /home/sim/yocto/scarthgap/build/tmp/work/x86_64-linux/python-native/2.7.18/recipe-sysroot-native/usr/lib/python2.7/test/test_sax.pyt   test_5027_25  s    

c         C   s3   |  j  ƒ  } d „  } | | ƒ |  j | j ƒ d  S(   Nc         S   s*   t  |  ƒ } | j ƒ  | j d i  ƒ d  S(   NR6   (   R   R‹   RŒ   (   t   outR�   (    (    sƒ   /home/sim/yocto/scarthgap/build/tmp/work/x86_64-linux/python-native/2.7.18/recipe-sysroot-native/usr/lib/python2.7/test/test_sax.pyt   funcS  s    
(   RŠ   R&   R]   (   R-   RM   RÁ   (    (    sƒ   /home/sim/yocto/scarthgap/build/tmp/work/x86_64-linux/python-native/2.7.18/recipe-sysroot-native/usr/lib/python2.7/test/test_sax.pyt   test_no_close_fileQ  s    	
c         C   s‡   |  j  ƒ  } t | ƒ } | j d i d d 6ƒ | j d ƒ | j d ƒ | j d i d d 6ƒ | j d ƒ |  j | j ƒ  d ƒ d  S(	   Nt   foos   1.0Rš   R½   t   bars   2.0R­   s+   <foo a="1.0">Hello</foo><bar b="2.0"></bar>(   RŠ   R   RŒ   R“   R�   R!   RK   (   R-   RM   R�   (    (    sƒ   /home/sim/yocto/scarthgap/build/tmp/work/x86_64-linux/python-native/2.7.18/recipe-sysroot-native/usr/lib/python2.7/test/test_sax.pyt   test_xmlgen_fragmentZ  s    (   R4   R5   R‘   R”   R—   R˜   R�   Rž   R    R£   R¤   R«   R®   R°   R²   R¸   R¿   RÂ   RÅ   (    (    (    sƒ   /home/sim/yocto/scarthgap/build/tmp/work/x86_64-linux/python-native/2.7.18/recipe-sysroot-native/usr/lib/python2.7/test/test_sax.pyR‰   ^  s"   	
																t   StringXmlgenTestc           B   s   e  Z e Z RS(    (   R4   R5   R   RŠ   (    (    (    sƒ   /home/sim/yocto/scarthgap/build/tmp/work/x86_64-linux/python-native/2.7.18/recipe-sysroot-native/usr/lib/python2.7/test/test_sax.pyRÆ   i  s   t   BytesIOXmlgenTestc           B   s   e  Z e j Z RS(    (   R4   R5   R@   RP   RŠ   (    (    (    sƒ   /home/sim/yocto/scarthgap/build/tmp/work/x86_64-linux/python-native/2.7.18/recipe-sysroot-native/usr/lib/python2.7/test/test_sax.pyRÇ   l  s   t   WriterXmlgenTestc           B   s   e  Z d  e f d „  ƒ  YZ RS(   RŠ   c           B   s    e  Z e j Z e Z d  „  Z RS(   c         C   s   d j  |  ƒ S(   Nt    (   t   join(   R-   (    (    sƒ   /home/sim/yocto/scarthgap/build/tmp/work/x86_64-linux/python-native/2.7.18/recipe-sysroot-native/usr/lib/python2.7/test/test_sax.pyRK   t  s    (   R4   R5   t   listt   appendRB   t   FalseR]   RK   (    (    (    sƒ   /home/sim/yocto/scarthgap/build/tmp/work/x86_64-linux/python-native/2.7.18/recipe-sysroot-native/usr/lib/python2.7/test/test_sax.pyRŠ   p  s   	(   R4   R5   RË   RŠ   (    (    (    sƒ   /home/sim/yocto/scarthgap/build/tmp/work/x86_64-linux/python-native/2.7.18/recipe-sysroot-native/usr/lib/python2.7/test/test_sax.pyRÈ   o  s   t   XMLFilterBaseTestc           B   s   e  Z d  „  Z RS(   c         C   s”   t  ƒ  } t | ƒ } t ƒ  } | j | ƒ | j ƒ  | j d i  ƒ | j d ƒ | j d ƒ | j d ƒ | j	 ƒ  |  j
 | j ƒ  t d ƒ d  S(   NR6   R~   R¡   s   <doc>content </doc>(   R   R   R
   Rµ   R‹   RŒ   R“   R¢   R�   RŽ   R!   RK   R�   (   R-   RM   R�   t   filter(    (    sƒ   /home/sim/yocto/scarthgap/build/tmp/work/x86_64-linux/python-native/2.7.18/recipe-sysroot-native/usr/lib/python2.7/test/test_sax.pyt   test_filter_basicy  s    		

(   R4   R5   RÐ   (    (    (    sƒ   /home/sim/yocto/scarthgap/build/tmp/work/x86_64-linux/python-native/2.7.18/recipe-sysroot-native/usr/lib/python2.7/test/test_sax.pyRÎ   x  s   t   ExpatReaderTestc           B   sï   e  Z d  „  Z e d „  ƒ Z d d d „  ƒ  YZ d „  Z d d d „  ƒ  YZ d „  Z d e	 f d	 „  ƒ  YZ
 d
 „  Z d „  Z d „  Z d „  Z d „  Z d „  Z e d „  ƒ Z d „  Z d „  Z d „  Z d „  Z d „  Z e d „  ƒ Z RS(   c         C   sX   t  ƒ  } t ƒ  } t | ƒ } | j | ƒ | j t t ƒ ƒ |  j | j ƒ  t	 ƒ d  S(   N(
   R   R   R   Rµ   RI   RA   t   TEST_XMLFILER!   RK   t   xml_test_out(   R-   R·   RM   t   xmlgen(    (    sƒ   /home/sim/yocto/scarthgap/build/tmp/work/x86_64-linux/python-native/2.7.18/recipe-sysroot-native/usr/lib/python2.7/test/test_sax.pyt   test_expat_binary_file”  s    		c         C   s„   t  j } t j t | ƒ |  j t  j | ƒ t ƒ  } t ƒ  } t	 | ƒ } | j
 | ƒ | j t | ƒ ƒ |  j | j ƒ  t ƒ d  S(   N(   RF   t   TESTFN_UNICODEt   shutilt   copyfileRÒ   t
   addCleanupRG   R   R   R   Rµ   RI   RA   R!   RK   RÓ   (   R-   t   fnameR·   RM   RÔ   (    (    sƒ   /home/sim/yocto/scarthgap/build/tmp/work/x86_64-linux/python-native/2.7.18/recipe-sysroot-native/usr/lib/python2.7/test/test_sax.pyt   test_expat_file_unicodež  s    			t   TestDTDHandlerc           B   s#   e  Z d  „  Z d „  Z d „  Z RS(   c         C   s   g  |  _  g  |  _ d  S(   N(   t
   _notationst	   _entities(   R-   (    (    sƒ   /home/sim/yocto/scarthgap/build/tmp/work/x86_64-linux/python-native/2.7.18/recipe-sysroot-native/usr/lib/python2.7/test/test_sax.pyt   __init__±  s    	c         C   s   |  j  j | | | f ƒ d  S(   N(   RÝ   RÌ   (   R-   t   namet   publicIdt   systemId(    (    sƒ   /home/sim/yocto/scarthgap/build/tmp/work/x86_64-linux/python-native/2.7.18/recipe-sysroot-native/usr/lib/python2.7/test/test_sax.pyt   notationDeclµ  s    c         C   s    |  j  j | | | | f ƒ d  S(   N(   RÞ   RÌ   (   R-   Rà   Rá   Râ   t   ndata(    (    sƒ   /home/sim/yocto/scarthgap/build/tmp/work/x86_64-linux/python-native/2.7.18/recipe-sysroot-native/usr/lib/python2.7/test/test_sax.pyt   unparsedEntityDecl¸  s    (   R4   R5   Rß   Rã   Rå   (    (    (    sƒ   /home/sim/yocto/scarthgap/build/tmp/work/x86_64-linux/python-native/2.7.18/recipe-sysroot-native/usr/lib/python2.7/test/test_sax.pyRÜ   ¯  s   		c         C   s�   t  ƒ  } |  j ƒ  } | j | ƒ | j d ƒ | j d ƒ | j d ƒ | j d ƒ | j d ƒ | j ƒ  |  j | j d
 g ƒ |  j | j d g ƒ d  S(   Ns   <!DOCTYPE doc [
s-     <!ENTITY img SYSTEM "expat.gif" NDATA GIF>
sW     <!NOTATION GIF PUBLIC "-//CompuServe//NOTATION Graphics Interchange Format 89a//EN">
s   ]>
s   <doc></doc>t   GIFs;   -//CompuServe//NOTATION Graphics Interchange Format 89a//ENt   imgs	   expat.gif(   Ræ   s;   -//CompuServe//NOTATION Graphics Interchange Format 89a//ENN(   Rç   Ns	   expat.gifRæ   (	   R   RÜ   t   setDTDHandlert   feedR|   R!   RÝ   R*   RÞ   (   R-   R·   t   handler(    (    sƒ   /home/sim/yocto/scarthgap/build/tmp/work/x86_64-linux/python-native/2.7.18/recipe-sysroot-native/usr/lib/python2.7/test/test_sax.pyt   test_expat_dtdhandler»  s    	

t   TestEntityResolverc           B   s   e  Z d  „  Z RS(   c         C   s    t  ƒ  } | j t d ƒ ƒ | S(   Ns	   <entity/>(   R   RS   R   (   R-   Rá   Râ   t   inpsrc(    (    sƒ   /home/sim/yocto/scarthgap/build/tmp/work/x86_64-linux/python-native/2.7.18/recipe-sysroot-native/usr/lib/python2.7/test/test_sax.pyt   resolveEntityÏ  s    	(   R4   R5   Rî   (    (    (    sƒ   /home/sim/yocto/scarthgap/build/tmp/work/x86_64-linux/python-native/2.7.18/recipe-sysroot-native/usr/lib/python2.7/test/test_sax.pyRì   Í  s   c         C   s”   t  ƒ  } | j |  j ƒ  ƒ t ƒ  } | j t | ƒ ƒ | j d ƒ | j d ƒ | j d ƒ | j d ƒ | j ƒ  |  j | j	 ƒ  t
 d ƒ d  S(   Ns   <!DOCTYPE doc [
s#     <!ENTITY test SYSTEM "whatever">
s   ]>
s   <doc>&test;</doc>s   <doc><entity></entity></doc>(   R   t   setEntityResolverRì   R   Rµ   R   Ré   R|   R!   RK   R�   (   R-   R·   RM   (    (    sƒ   /home/sim/yocto/scarthgap/build/tmp/work/x86_64-linux/python-native/2.7.18/recipe-sysroot-native/usr/lib/python2.7/test/test_sax.pyt   test_expat_entityresolverÔ  s    		
t   AttrGathererc           B   s   e  Z d  „  Z d „  Z RS(   c         C   s   | |  _  d  S(   N(   t   _attrs(   R-   Rà   R   (    (    sƒ   /home/sim/yocto/scarthgap/build/tmp/work/x86_64-linux/python-native/2.7.18/recipe-sysroot-native/usr/lib/python2.7/test/test_sax.pyRŒ   ç  s    c         C   s   | |  _  d  S(   N(   Rò   (   R-   Rà   t   qnameR   (    (    sƒ   /home/sim/yocto/scarthgap/build/tmp/work/x86_64-linux/python-native/2.7.18/recipe-sysroot-native/usr/lib/python2.7/test/test_sax.pyR¨   ê  s    (   R4   R5   RŒ   R¨   (    (    (    sƒ   /home/sim/yocto/scarthgap/build/tmp/work/x86_64-linux/python-native/2.7.18/recipe-sysroot-native/usr/lib/python2.7/test/test_sax.pyRñ   å  s   	c         C   sM   t  ƒ  } |  j ƒ  } | j | ƒ | j d ƒ | j ƒ  |  j | j ƒ d  S(   Ns   <doc/>(   R   Rñ   Rµ   Ré   R|   R.   Rò   (   R-   R·   t   gather(    (    sƒ   /home/sim/yocto/scarthgap/build/tmp/work/x86_64-linux/python-native/2.7.18/recipe-sysroot-native/usr/lib/python2.7/test/test_sax.pyt   test_expat_attrs_emptyí  s    	
c         C   sM   t  ƒ  } |  j ƒ  } | j | ƒ | j d ƒ | j ƒ  |  j | j ƒ d  S(   Ns   <doc attr='val'/>(   R   Rñ   Rµ   Ré   R|   R3   Rò   (   R-   R·   Rô   (    (    sƒ   /home/sim/yocto/scarthgap/build/tmp/work/x86_64-linux/python-native/2.7.18/recipe-sysroot-native/usr/lib/python2.7/test/test_sax.pyt   test_expat_attrs_wattr÷  s    	
c         C   sP   t  d ƒ } |  j ƒ  } | j | ƒ | j d ƒ | j ƒ  |  j | j ƒ d  S(   Ni   s   <doc/>(   R   Rñ   Rµ   Ré   R|   R0   Rò   (   R-   R·   Rô   (    (    sƒ   /home/sim/yocto/scarthgap/build/tmp/work/x86_64-linux/python-native/2.7.18/recipe-sysroot-native/usr/lib/python2.7/test/test_sax.pyt   test_expat_nsattrs_empty  s    
c         C   sš  t  d ƒ } |  j ƒ  } | j | ƒ | j d t ƒ | j ƒ  | j } |  j | j ƒ  d ƒ |  j | j	 ƒ  t d f g ƒ |  j
 | j ƒ  g  k p¨ | j ƒ  d g k ƒ |  j t | ƒ d ƒ |  j
 | j t d f ƒ ƒ |  j | j t d f ƒ d ƒ |  j | j t d f d ƒ d ƒ |  j | j ƒ  t d f d f g ƒ |  j | j ƒ  d g ƒ |  j | j t d f ƒ d ƒ |  j | t d f d ƒ d  S(   Ni   s"   <doc xmlns:ns='%s' ns:attr='val'/>R   s   ns:attrR1   i   (   R   Rñ   Rµ   Ré   R/   R|   Rò   R!   R"   R#   R2   R$   R%   R'   R)   R+   R,   R   (   R-   R·   Rô   R   (    (    sƒ   /home/sim/yocto/scarthgap/build/tmp/work/x86_64-linux/python-native/2.7.18/recipe-sysroot-native/usr/lib/python2.7/test/test_sax.pyt   test_expat_nsattrs_wattr  s$    
	"%c         C   sR   t  ƒ  } t ƒ  } t | ƒ } | j | ƒ | j t ƒ |  j | j ƒ  t ƒ d  S(   N(	   R   R   R   Rµ   RI   RÒ   R!   RK   RÓ   (   R-   R·   RM   RÔ   (    (    sƒ   /home/sim/yocto/scarthgap/build/tmp/work/x86_64-linux/python-native/2.7.18/recipe-sysroot-native/usr/lib/python2.7/test/test_sax.pyt   test_expat_inpsource_filename$  s    		c         C   sX   t  ƒ  } t ƒ  } t | ƒ } | j | ƒ | j t t ƒ ƒ |  j | j ƒ  t	 ƒ d  S(   N(
   R   R   R   Rµ   RI   R   RÒ   R!   RK   RÓ   (   R-   R·   RM   RÔ   (    (    sƒ   /home/sim/yocto/scarthgap/build/tmp/work/x86_64-linux/python-native/2.7.18/recipe-sysroot-native/usr/lib/python2.7/test/test_sax.pyt   test_expat_inpsource_sysid.  s    		c         C   s„   t  j } t j t | ƒ |  j t  j | ƒ t ƒ  } t ƒ  } t	 | ƒ } | j
 | ƒ | j t | ƒ ƒ |  j | j ƒ  t ƒ d  S(   N(   RF   RÖ   R×   RØ   RÒ   RÙ   RG   R   R   R   Rµ   RI   R   R!   RK   RÓ   (   R-   RÚ   R·   RM   RÔ   (    (    sƒ   /home/sim/yocto/scarthgap/build/tmp/work/x86_64-linux/python-native/2.7.18/recipe-sysroot-native/usr/lib/python2.7/test/test_sax.pyt"   test_expat_inpsource_sysid_unicode8  s    			c         C   sn   t  ƒ  } t ƒ  } t | ƒ } | j | ƒ t ƒ  } | j t t ƒ ƒ | j | ƒ |  j	 | j
 ƒ  t ƒ d  S(   N(   R   R   R   Rµ   R   RS   RA   RÒ   RI   R!   RK   RÓ   (   R-   R·   RM   RÔ   Rí   (    (    sƒ   /home/sim/yocto/scarthgap/build/tmp/work/x86_64-linux/python-native/2.7.18/recipe-sysroot-native/usr/lib/python2.7/test/test_sax.pyt    test_expat_inpsource_byte_streamG  s    			c         C   sm   t  ƒ  } t | ƒ } t ƒ  } | j | ƒ | j d ƒ | j d ƒ | j ƒ  |  j | j ƒ  t d ƒ d  S(   Ns   <doc>s   </doc>s   <doc></doc>(	   R   R   R   Rµ   Ré   R|   R!   RK   R�   (   R-   RM   RÔ   R·   (    (    sƒ   /home/sim/yocto/scarthgap/build/tmp/work/x86_64-linux/python-native/2.7.18/recipe-sysroot-native/usr/lib/python2.7/test/test_sax.pyt   test_expat_incrementalU  s    		
c         C   sÀ   t  ƒ  } t | ƒ } t ƒ  } | j | ƒ | j d ƒ | j d ƒ t  ƒ  } t | ƒ } | j | ƒ | j ƒ  | j d ƒ | j d ƒ | j d ƒ | j ƒ  |  j | j ƒ  t	 d ƒ d  S(   Ns   <doc>t   texts   </doc>s   <doc>text</doc>(
   R   R   R   Rµ   Ré   t   resetR|   R!   RK   R�   (   R-   RM   RÔ   R·   (    (    sƒ   /home/sim/yocto/scarthgap/build/tmp/work/x86_64-linux/python-native/2.7.18/recipe-sysroot-native/usr/lib/python2.7/test/test_sax.pyt   test_expat_incremental_reseta  s    			

c         C   s•   t  ƒ  } t | ƒ } t ƒ  } | j | ƒ | j d ƒ | j d ƒ | j ƒ  |  j | j ƒ  d  ƒ |  j | j	 ƒ  d  ƒ |  j | j
 ƒ  d ƒ d  S(   Ns   <doc>s   </doc>i   (   R   R   R   Rµ   Ré   R|   R!   t   getSystemIdR*   t   getPublicIdt   getLineNumber(   R-   RM   RÔ   R·   (    (    sƒ   /home/sim/yocto/scarthgap/build/tmp/work/x86_64-linux/python-native/2.7.18/recipe-sysroot-native/usr/lib/python2.7/test/test_sax.pyt   test_expat_locator_noinfox  s    		
c         C   sh   t  ƒ  } t | ƒ } t ƒ  } | j | ƒ | j t ƒ |  j | j ƒ  t ƒ |  j | j ƒ  d  ƒ d  S(   N(
   R   R   R   Rµ   RI   RÒ   R!   R  R  R*   (   R-   RM   RÔ   R·   (    (    sƒ   /home/sim/yocto/scarthgap/build/tmp/work/x86_64-linux/python-native/2.7.18/recipe-sysroot-native/usr/lib/python2.7/test/test_sax.pyt   test_expat_locator_withinfo†  s    		c         C   s”   t  j } t j t | ƒ |  j t  j | ƒ t ƒ  } t | ƒ } t	 ƒ  } | j
 | ƒ | j | ƒ |  j | j ƒ  | ƒ |  j | j ƒ  d  ƒ d  S(   N(   RF   RÖ   R×   RØ   RÒ   RÙ   RG   R   R   R   Rµ   RI   R!   R  R  R*   (   R-   RÚ   RM   RÔ   R·   (    (    sƒ   /home/sim/yocto/scarthgap/build/tmp/work/x86_64-linux/python-native/2.7.18/recipe-sysroot-native/usr/lib/python2.7/test/test_sax.pyt#   test_expat_locator_withinfo_unicode�  s    			(    (    (   R4   R5   RÕ   t   requires_unicode_filenamesRÛ   RÜ   Rë   Rì   Rð   R   Rñ   Rõ   Rö   R÷   Rø   Rù   Rú   Rû   Rü   Rý   R   R  R  R  (    (    (    sƒ   /home/sim/yocto/scarthgap/build/tmp/work/x86_64-linux/python-native/2.7.18/recipe-sysroot-native/usr/lib/python2.7/test/test_sax.pyRÑ   �  s(   	
			
	
	
		
	
					
t   ErrorReportingTestc           B   s6   e  Z d  „  Z d „  Z d „  Z d d d „  ƒ  YZ RS(   c         C   s“   t  ƒ  } | j t ƒ  ƒ t ƒ  } | j t d ƒ ƒ d } | j | ƒ y | j | ƒ |  j ƒ  Wn) t	 k
 rŽ } |  j
 | j ƒ  | ƒ n Xd  S(   Ns   <foo bar foobar>s   a file name(   R   Rµ   R   R   RS   R   t   setSystemIdRI   t   failR   R!   R  (   R-   R·   t   sourceRà   R›   (    (    sƒ   /home/sim/yocto/scarthgap/build/tmp/work/x86_64-linux/python-native/2.7.18/recipe-sysroot-native/usr/lib/python2.7/test/test_sax.pyt   test_expat_inpsource_location§  s    		c         C   se   t  ƒ  } | j t ƒ  ƒ |  j t | j t d ƒ ƒ |  j | j ƒ  d ƒ |  j | j	 ƒ  d ƒ d  S(   Ns   <foo>i   i   (
   R   Rµ   R   R   R   RI   R   R!   t   getColumnNumberR  (   R-   R·   (    (    sƒ   /home/sim/yocto/scarthgap/build/tmp/work/x86_64-linux/python-native/2.7.18/recipe-sysroot-native/usr/lib/python2.7/test/test_sax.pyt   test_expat_incomplete´  s
    	c         C   sŒ   t  t d d  |  j d d ƒ ƒ ƒ t  t d d  |  j d  d ƒ ƒ ƒ t  t d d  |  j d d  ƒ ƒ ƒ t  t d d  |  j d  d  ƒ ƒ ƒ d  S(   Nt   messagei   (   t   strR   R*   t   DummyLocator(   R-   (    (    sƒ   /home/sim/yocto/scarthgap/build/tmp/work/x86_64-linux/python-native/2.7.18/recipe-sysroot-native/usr/lib/python2.7/test/test_sax.pyt   test_sax_parse_exception_str»  s    R  c           B   s5   e  Z d  „  Z d „  Z d „  Z d „  Z d „  Z RS(   c         C   s   | |  _  | |  _ d  S(   N(   t   _linenot   _colno(   R-   t   linenot   colno(    (    sƒ   /home/sim/yocto/scarthgap/build/tmp/work/x86_64-linux/python-native/2.7.18/recipe-sysroot-native/usr/lib/python2.7/test/test_sax.pyRß   Î  s    	c         C   s   d S(   Nt   pubid(    (   R-   (    (    sƒ   /home/sim/yocto/scarthgap/build/tmp/work/x86_64-linux/python-native/2.7.18/recipe-sysroot-native/usr/lib/python2.7/test/test_sax.pyR  Ò  s    c         C   s   d S(   Nt   sysid(    (   R-   (    (    sƒ   /home/sim/yocto/scarthgap/build/tmp/work/x86_64-linux/python-native/2.7.18/recipe-sysroot-native/usr/lib/python2.7/test/test_sax.pyR  Õ  s    c         C   s   |  j  S(   N(   R  (   R-   (    (    sƒ   /home/sim/yocto/scarthgap/build/tmp/work/x86_64-linux/python-native/2.7.18/recipe-sysroot-native/usr/lib/python2.7/test/test_sax.pyR  Ø  s    c         C   s   |  j  S(   N(   R  (   R-   (    (    sƒ   /home/sim/yocto/scarthgap/build/tmp/work/x86_64-linux/python-native/2.7.18/recipe-sysroot-native/usr/lib/python2.7/test/test_sax.pyR  Û  s    (   R4   R5   Rß   R  R  R  R  (    (    (    sƒ   /home/sim/yocto/scarthgap/build/tmp/work/x86_64-linux/python-native/2.7.18/recipe-sysroot-native/usr/lib/python2.7/test/test_sax.pyR  Í  s
   				(    (   R4   R5   R  R  R  R  (    (    (    sƒ   /home/sim/yocto/scarthgap/build/tmp/work/x86_64-linux/python-native/2.7.18/recipe-sysroot-native/usr/lib/python2.7/test/test_sax.pyR  ¦  s   			t   XmlReaderTestc           B   s>   e  Z d  „  Z d „  Z d „  Z d „  Z d „  Z d „  Z RS(   c         C   s   |  j  t i  ƒ ƒ d  S(   N(   R.   R   (   R-   (    (    sƒ   /home/sim/yocto/scarthgap/build/tmp/work/x86_64-linux/python-native/2.7.18/recipe-sysroot-native/usr/lib/python2.7/test/test_sax.pyt   test_attrs_emptyç  s    c         C   s   |  j  t i d d 6ƒ ƒ d  S(   NR1   R   (   R3   R   (   R-   (    (    sƒ   /home/sim/yocto/scarthgap/build/tmp/work/x86_64-linux/python-native/2.7.18/recipe-sysroot-native/usr/lib/python2.7/test/test_sax.pyt   test_attrs_wattrê  s    c         C   s   |  j  t i  i  ƒ ƒ d  S(   N(   R0   R   (   R-   (    (    sƒ   /home/sim/yocto/scarthgap/build/tmp/work/x86_64-linux/python-native/2.7.18/recipe-sysroot-native/usr/lib/python2.7/test/test_sax.pyt   test_nsattrs_emptyí  s    c         C   sÛ  t  i d t d f 6i d t d f 6ƒ } |  j | j ƒ  d ƒ |  j | j ƒ  t d f g ƒ |  j | j ƒ  d g ƒ |  j t | ƒ d ƒ |  j | j t d f ƒ ƒ |  j | j	 ƒ  t d f g ƒ |  j | j
 t d f ƒ d ƒ |  j | j
 t d f d ƒ d ƒ |  j | j ƒ  t d f d f g ƒ |  j | j ƒ  d g ƒ |  j | j t d f ƒ d ƒ |  j | j d ƒ d ƒ |  j | j d ƒ t d f ƒ |  j | t d f d ƒ |  j | j t d f ƒ d ƒ d  S(   NR1   R   s   ns:attri   i   (   R   R/   R!   R"   R#   R$   R%   R2   R'   R(   R)   R+   R,   R   R   R   R   (   R-   R   (    (    sƒ   /home/sim/yocto/scarthgap/build/tmp/work/x86_64-linux/python-native/2.7.18/recipe-sysroot-native/usr/lib/python2.7/test/test_sax.pyt   test_nsattrs_wattrð  s"    "%c         C   s˜   d d  l  } | j j ƒ  } x3 | j j ƒ  D]" } | j d ƒ r+ | j | =q+ q+ Wz/ d d  l } | j j } |  j | j	 d ƒ Wd  | j j
 | ƒ Xd  S(   Niÿÿÿÿs   xml.s   xml.sax.expatreader(   t   syst   modulest   copyR(   t
   startswitht   xml.sax.expatreadert   saxt   expatreaderR!   R4   t   update(   R-   R  t   old_modulest   modnamet   xmlt   module(    (    sƒ   /home/sim/yocto/scarthgap/build/tmp/work/x86_64-linux/python-native/2.7.18/recipe-sysroot-native/usr/lib/python2.7/test/test_sax.pyt   test_sf_1511497  s    c         C   s?   t  d ƒ } t ƒ  } d d l m } |  j | | j | ƒ d  S(   Nt   invalidiÿÿÿÿ(   R   (   R   R    RJ   R   R   RI   (   R-   t   sioR·   R   (    (    sƒ   /home/sim/yocto/scarthgap/build/tmp/work/x86_64-linux/python-native/2.7.18/recipe-sysroot-native/usr/lib/python2.7/test/test_sax.pyt   test_sf_1513611*  s    	(   R4   R5   R  R  R  R  R*  R-  (    (    (    sƒ   /home/sim/yocto/scarthgap/build/tmp/work/x86_64-linux/python-native/2.7.18/recipe-sysroot-native/usr/lib/python2.7/test/test_sax.pyR  ä  s   				,	c           C   s)   t  t t t t t t t t t	 t
 ƒ
 d  S(   N(   R   Rd   RE   Rg   Ru   RÆ   RÇ   RÈ   RÑ   R  R  (    (    (    sƒ   /home/sim/yocto/scarthgap/build/tmp/work/x86_64-linux/python-native/2.7.18/recipe-sysroot-native/usr/lib/python2.7/test/test_sax.pyt	   test_main2  s    t   __main__(M   RJ   R    R   R   R   R   R   t   ImportErrort   xml.sax.saxutilsR   R   R   R	   R
   R   R"  R   t   xml.sax.handlerR   t   xml.sax.xmlreaderR   R   R   t	   cStringIOR   R@   t   gct   os.patht   osR×   t   test.test_supportt   test_supportRF   R   R   R   t   unittestRÒ   t   TEST_XMLFILE_OUTR´   t   supports_unicode_filenamest   pathRÖ   R;   t   TESTFN_ENCODINGt   AttributeErrort   UnicodeErrort	   TypeErrorRÍ   t
   skipUnlessR  R/   t   TestCaseR   R*   R8   R:   R=   RD   RE   Rd   Rg   Ru   R�   R‰   RÆ   RÇ   RÈ   RÎ   RA   R{   RÓ   RÑ   R  R  R.  R4   (    (    (    sƒ   /home/sim/yocto/scarthgap/build/tmp/work/x86_64-linux/python-native/2.7.18/recipe-sysroot-native/usr/lib/python2.7/test/test_sax.pyt   <module>   sf   ..	5f48ÿ 	ÿ >N	