ó
ŒwÛjc        !   @   s  d  d l  m Z d  d l Z d  d l Z d  d l Z d  d l Z d Z d Z d Z d Z	 d g  f d g  f d g  f d	 d d f g f d
 d d f g f d d d f g f d d d f g f d d d f g f d d d f g f d d d f d d f g f d d d f d d f g f d g  f d g  f d d d f g f d d d f d d f g f d d d f d d f g f d g  f d g  f d d d f g f d d d f d d f g f d d d f d d f g f g Z
 d i  f d i  f d i  f d	 i d g d 6f d
 i d g d 6f d i d g d 6f d i d g d 6f d i d g d 6f d i d g d 6d g d 6f d i d d g d 6f d i  f d i  f d i  f d	 i d g d 6f d
 i d g d 6f d i d g d 6f d i d g d 6f d i d g d 6f d i d g d 6d g d 6f d i d d g d 6f d i  f d i  f d i d g d 6f d i d g d 6d g d 6f d i d d g d 6f d i  f d i  f d i d g d 6f d i d g d 6d g d 6f d i d d g d 6f g Z d e j f d „  ƒ  YZ d „  Z e d k re ƒ  n  d S(   iÿÿÿÿ(   t   test_supportNs   http://a/b/c/d;p?q#fs   http://a/b/c/d;p?qs   http://a/b/c/dt    t   &s   &&t   =s   =at   as   a=s   &a=bt   bs   a=a+b&b=b+cs   a bs   b cs   a=1&a=2t   1t   2t   ;s   ;;s   ;a=bs   a=a+b;b=b+cs   a=1;a=2t   UrlParseTestCasec           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 d „  Z RS(   c         C   s>  t  j  | ƒ } |  j | | ƒ | j | j | j | j | j | j f } |  j | | ƒ t  j | ƒ } |  j | | ƒ |  j | | j	 ƒ  ƒ t  j  | j	 ƒ  ƒ } |  j | j	 ƒ  | j	 ƒ  ƒ |  j | | ƒ |  j | j | j ƒ |  j | j | j ƒ |  j | j | j ƒ |  j | j | j ƒ |  j | j | j ƒ |  j | j | j ƒ |  j | j
 | j
 ƒ |  j | j | j ƒ |  j | j | j ƒ |  j | j | j ƒ t  j | ƒ } |  j | | ƒ | j | j | j | j | j f } |  j | | ƒ t  j | ƒ } |  j | | ƒ |  j | | j	 ƒ  ƒ t  j | j	 ƒ  ƒ } |  j | j	 ƒ  | j	 ƒ  ƒ |  j | | ƒ |  j | j | j ƒ |  j | j | j ƒ |  j | j | j ƒ |  j | j | j ƒ |  j | j | j ƒ |  j | j
 | j
 ƒ |  j | j | j ƒ |  j | j | j ƒ |  j | j | j ƒ d  S(   N(   t   urlparset   assertEqualt   schemet   netloct   patht   paramst   queryt   fragmentt
   urlunparset   geturlt   usernamet   passwordt   hostnamet   portt   urlsplitt
   urlunsplit(   t   selft   urlt   parsedt   splitt   resultt   tt   result2t   result3(    (    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_urlparse.pyt   checkRoundtripsJ   sR    c         C   sœ   x• t  D]� \ } } t j | d t ƒ} |  j | | d | ƒ g  | D] } t | d ƒ rF | ^ qF } t j | d t ƒ} |  j | | d | ƒ q Wd  S(   Nt   keep_blank_valuess   Error parsing %ri   (   t   parse_qsl_test_casesR
   t	   parse_qslt   TrueR   t   lent   False(   R   t   origt   expectR   t   vt   expect_without_blanks(    (    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_urlparse.pyt   test_qsl}   s    )c         C   s°   x© t  D]¡ \ } } t j | d t ƒ} |  j | | d | ƒ t g  | D]* } t | | d ƒ rI | | | f ^ qI ƒ } t j | d t ƒ} |  j | | d | ƒ q Wd  S(   NR#   s   Error parsing %ri    (   t   parse_qs_test_casesR
   t   parse_qsR&   R   t   dictR'   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_urlparse.pyt   test_qs†   s    :c         C   s   d d d f d d d f d	 d d f d d d  f d d! d" f d d# d$ f g } x* | D]" \ } } } |  j  | | | ƒ qU Wd  S(%   Ns   file:///tmp/junk.txtt   fileR   s   /tmp/junk.txts   imap://mail.python.org/mbox1t   imaps   mail.python.orgs   /mbox1s1   mms://wms.sys.hinet.net/cts/Drama/09006251100.asft   mmss   wms.sys.hinet.nets   /cts/Drama/09006251100.asfs   nfs://server/path/to/file.txtt   nfst   servers   /path/to/file.txts0   svn+ssh://svn.zope.org/repos/main/ZConfig/trunk/s   svn+sshs   svn.zope.orgs   /repos/main/ZConfig/trunk/s)   git+ssh://git@github.com/user/project.gits   git+sshs   git@github.coms   /user/project.git(   R2   R   s   /tmp/junk.txtR   R   R   (   R2   R   s   /tmp/junk.txtR   R   (   R3   s   mail.python.orgs   /mbox1R   R   R   (   R3   s   mail.python.orgs   /mbox1R   R   (   R4   s   wms.sys.hinet.nets   /cts/Drama/09006251100.asfR   R   R   (   R4   s   wms.sys.hinet.nets   /cts/Drama/09006251100.asfR   R   (   R5   R6   s   /path/to/file.txtR   R   R   (   R5   R6   s   /path/to/file.txtR   R   (   s   svn+sshs   svn.zope.orgs   /repos/main/ZConfig/trunk/R   R   R   (   s   svn+sshs   svn.zope.orgs   /repos/main/ZConfig/trunk/R   R   (   s   git+sshs   git@github.coms   /user/project.gitR   R   R   (   s   git+sshs   git@github.coms   /user/project.gitR   R   (   R"   (   R   t	   testcasesR   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_urlparse.pyt   test_roundtrips�   s4          c      
   C   s¨   d d d f d d d f d d d f d d d f d
 d d f g } x_ d D]W } xN | D]F \ } } } | | } | f | } | f | } |  j  | | | ƒ qV WqI Wd  S(   Ns   ://www.python.orgs   www.python.orgR   s   ://www.python.org#abct   abcs   ://www.python.org?q=abcs   q=abcs   ://www.python.org/#abct   /s   ://a/b/c/d;p?q#fR   s   /b/c/dt   pt   qt   fs   /b/c/d;pt   httpt   https(   s   www.python.orgR   R   R   R   (   s   www.python.orgR   R   R   (   s   www.python.orgR   R   R   R9   (   s   www.python.orgR   R   R9   (   s   www.python.orgR   R   s   q=abcR   (   s   www.python.orgR   s   q=abcR   (   s   www.python.orgR:   R   R   R9   (   s   www.python.orgR:   R   R9   (   R   s   /b/c/dR;   R<   R=   (   R   s   /b/c/d;pR<   R=   (   R>   R?   (   R"   (   R   R7   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_urlparse.pyt   test_http_roundtrips®   s*    
c         C   s,   |  j  t j | | ƒ | | | | f ƒ d  S(   N(   R   R
   t   urljoin(   R   t   baset   relurlt   expected(    (    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_urlparse.pyt	   checkJoinÊ   s    c         C   sn   xg d d d d d d d g D]J } |  j  t j t j | ƒ ƒ | ƒ |  j  t j t j | ƒ ƒ | ƒ q Wd  S(   Nt   Pythons   ./Pythons   x-newscheme://foo.com/stuffs   x://ys   x:/ys   x:/R:   (   R   R
   R   R   R   (   R   t   u(    (    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_urlparse.pyt   test_unparse_parseÎ   s    ""c         C   s�  |  j  t d d ƒ |  j  t d d ƒ |  j  t d d ƒ |  j  t d d ƒ |  j  t d d ƒ |  j  t d	 d
 ƒ |  j  t d d ƒ |  j  t d d ƒ |  j  t d d ƒ |  j  t d d ƒ |  j  t d d ƒ |  j  t d d ƒ |  j  t d d ƒ |  j  t d d ƒ |  j  t d d ƒ |  j  t d d ƒ |  j  t d d ƒ |  j  t d  d ƒ |  j  t d! d" ƒ |  j  t d# d$ ƒ |  j  t d% d$ ƒ |  j  t d& d ƒ |  j  t d' d( ƒ |  j  t d) d* ƒ |  j  t d+ d, ƒ |  j  t d- d. ƒ |  j  t d/ d* ƒ |  j  t d0 d1 ƒ |  j  t d2 d3 ƒ |  j  t d4 d5 ƒ |  j  t d6 d7 ƒ |  j  t d8 d" ƒ |  j  t d9 d ƒ |  j  t d: d; ƒ |  j  t d< d= ƒ d  S(>   Ns   g:ht   gs   http://a/b/c/gs   ./gs   g/s   http://a/b/c/g/s   /gs
   http://a/gs   //gs   http://gs   g?ys   http://a/b/c/g?ys   g?y/./xs   http://a/b/c/g?y/./xs   #ss   http://a/b/c/d;p?q#ss   g#ss   http://a/b/c/g#ss   g#s/./xs   http://a/b/c/g#s/./xs   g?y#ss   http://a/b/c/g?y#ss   g;xs   http://a/b/c/g;xs   g;x?y#ss   http://a/b/c/g;x?y#st   .s   http://a/b/c/s   ./s   ..s   http://a/b/s   ../s   ../gs   http://a/b/gs   ../..s	   http://a/s   ../../s   ../../gR   s   http://a/b/c/d;p?q#fs
   ../../../gs   http://a/../gs   ../../../../gs   http://a/../../gs   /./gs   http://a/./gs   /../gs   g.s   http://a/b/c/g.s   .gs   http://a/b/c/.gs   g..s   http://a/b/c/g..s   ..gs   http://a/b/c/..gs   ./../gs   ./g/.s   g/./hs   http://a/b/c/g/hs   g/../hs   http://a/b/c/h(   RE   t   RFC1808_BASE(   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_urlparse.pyt   test_RFC1808Ó   sF    c         C   s   |  j  t j d ƒ d ƒ d  S(   Ns   mailto:1337@example.orgt   mailtoR   s   1337@example.org(   RM   R   s   1337@example.orgR   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_urlparse.pyt   test_RFC2368   s    c         C   sé  |  j  t d d ƒ |  j  t d d ƒ |  j  t d d ƒ |  j  t d d ƒ |  j  t d d ƒ |  j  t d	 d
 ƒ |  j  t d d ƒ |  j  t d d ƒ |  j  t d d ƒ |  j  t d d ƒ |  j  t d d ƒ |  j  t d d ƒ |  j  t d d ƒ |  j  t d d ƒ |  j  t d d ƒ |  j  t d d ƒ |  j  t d d ƒ |  j  t d d  ƒ |  j  t d! d  ƒ |  j  t d" d ƒ |  j  t d# t ƒ |  j  t d$ d% ƒ |  j  t d& d' ƒ |  j  t d( d) ƒ |  j  t d* d% ƒ |  j  t d+ d, ƒ |  j  t d- d. ƒ |  j  t d/ d0 ƒ |  j  t d1 d2 ƒ |  j  t d3 d ƒ |  j  t d4 d ƒ |  j  t d5 d6 ƒ |  j  t d7 d8 ƒ |  j  t d9 d: ƒ |  j  t d; d< ƒ |  j  t d= d> ƒ |  j  t d? d@ ƒ |  j  t dA dB ƒ |  j  t dC dD ƒ d  S(E   Ns   g:hRI   s   http://a/b/c/gs   ./gs   g/s   http://a/b/c/g/s   /gs
   http://a/gs   //gs   http://gs   g?ys   http://a/b/c/g?ys   #ss   http://a/b/c/d;p?q#ss   g#ss   http://a/b/c/g#ss   g?y#ss   http://a/b/c/g?y#ss   g;xs   http://a/b/c/g;xs   g;x?y#ss   http://a/b/c/g;x?y#sRJ   s   http://a/b/c/s   ./s   ..s   http://a/b/s   ../s   ../gs   http://a/b/gs   ../..s	   http://a/s   ../../s   ../../gR   s
   ../../../gs   http://a/../gs   ../../../../gs   http://a/../../gs   /./gs   http://a/./gs   /../gs   g.s   http://a/b/c/g.s   .gs   http://a/b/c/.gs   g..s   http://a/b/c/g..s   ..gs   http://a/b/c/..gs   ./../gs   ./g/.s   g/./hs   http://a/b/c/g/hs   g/../hs   http://a/b/c/hs	   g;x=1/./ys   http://a/b/c/g;x=1/ys
   g;x=1/../ys   http://a/b/c/ys   g?y/./xs   http://a/b/c/g?y/./xs   g?y/../xs   http://a/b/c/g?y/../xs   g#s/./xs   http://a/b/c/g#s/./xs   g#s/../xs   http://a/b/c/g#s/../x(   RE   t   RFC2396_BASE(   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_urlparse.pyt   test_RFC2396  sN    c         C   s  |  j  t d d ƒ |  j  t d d ƒ |  j  t d d ƒ |  j  t d d ƒ |  j  t d d ƒ |  j  t d	 d
 ƒ |  j  t d d ƒ |  j  t d d ƒ |  j  t d d ƒ |  j  t d d ƒ |  j  t d d ƒ |  j  t d d ƒ |  j  t d d ƒ |  j  t d d ƒ |  j  t d d ƒ |  j  t d d ƒ |  j  t d d ƒ |  j  t d d ƒ |  j  t d d ƒ |  j  t d  d! ƒ |  j  t d" d! ƒ |  j  t d# d$ ƒ |  j  t d% d& ƒ |  j  t d' d& ƒ |  j  t d( d ƒ |  j  t d) d* ƒ |  j  t d+ d, ƒ |  j  t d- d. ƒ |  j  t d/ d0 ƒ |  j  t d1 d$ ƒ |  j  t d2 d
 ƒ |  j  t d3 d4 ƒ |  j  t d5 d6 ƒ |  j  t d7 d8 ƒ |  j  t d9 d: ƒ |  j  t d; d< ƒ |  j  t d= d> ƒ |  j  t d? d@ ƒ |  j  t dA dB ƒ |  j  t dC d ƒ |  j  dD d d ƒ d  S(E   Ns   ?ys   http://a/b/c/d;p?ys   ;xs   http://a/b/c/;xs   g:hRI   s   http://a/b/c/gs   ./gs   g/s   http://a/b/c/g/s   /gs
   http://a/gs   //gs   http://gs   g?ys   http://a/b/c/g?ys   #ss   http://a/b/c/d;p?q#ss   g#ss   http://a/b/c/g#ss   g?y#ss   http://a/b/c/g?y#ss   g;xs   http://a/b/c/g;xs   g;x?y#ss   http://a/b/c/g;x?y#sR   s   http://a/b/c/d;p?qRJ   s   http://a/b/c/s   ./s   ..s   http://a/b/s   ../s   ../gs   http://a/b/gs   ../..s	   http://a/s   ../../s   ../../gs   g.s   http://a/b/c/g.s   .gs   http://a/b/c/.gs   g..s   http://a/b/c/g..s   ..gs   http://a/b/c/..gs   ./../gs   ./g/.s   g/./hs   http://a/b/c/g/hs   g/../hs   http://a/b/c/hs	   g;x=1/./ys   http://a/b/c/g;x=1/ys
   g;x=1/../ys   http://a/b/c/ys   g?y/./xs   http://a/b/c/g?y/./xs   g?y/../xs   http://a/b/c/g?y/../xs   g#s/./xs   http://a/b/c/g#s/./xs   g#s/../xs   http://a/b/c/g#s/../xs   http:gs   http://a/b/c/de(   RE   t   RFC3986_BASERO   (   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_urlparse.pyt   test_RFC3986/  sR    c         C   sŠ  |  j  t d d ƒ |  j  t d d ƒ |  j  t d d ƒ |  j  t d d ƒ |  j  t d d ƒ |  j  t d d	 ƒ |  j  t d
 d ƒ |  j  t d d ƒ |  j  t d d ƒ |  j  t d d ƒ |  j  t d d ƒ |  j  t d d ƒ |  j  t d d ƒ |  j  t d d ƒ |  j  t d d ƒ |  j  t d d ƒ |  j  t d d ƒ |  j  t d d ƒ |  j  t d d  ƒ |  j  t d! d ƒ |  j  t d" d	 ƒ |  j  t d# d$ ƒ |  j  t d% d& ƒ |  j  t d' d( ƒ |  j  t d d ƒ |  j  t d d ƒ |  j  t d) d ƒ |  j  t d* d ƒ |  j  t d+ d ƒ |  j  d, d d, ƒ |  j  d- d d ƒ |  j  d- d$ d$ ƒ |  j  d. d/ d0 ƒ |  j  d1 d/ d2 ƒ d  S(3   Ns   g:hs   http:gs   http://a/b/c/gs   http:s   http://a/b/c/dRI   s   ./gs   g/s   http://a/b/c/g/s   /gs
   http://a/gs   //gs   http://gs   ?ys   http://a/b/c/d?ys   g?ys   http://a/b/c/g?ys   g?y/./xs   http://a/b/c/g?y/./xRJ   s   http://a/b/c/s   ./s   ..s   http://a/b/s   ../s   ../gs   http://a/b/gs   ../..s	   http://a/s   ../../gs
   ../../../gs   http://a/../gs   ./../gs   ./g/.s   /./gs   http://a/./gs   g/./hs   http://a/b/c/g/hs   g/../hs   http://a/b/c/hs   http:?ys   http:g?ys   http:g?y/./xs   http:///R   s   svn://pathtorepo/dir1t   dir2s   svn://pathtorepo/dir2s   svn+ssh://pathtorepo/dir1s   svn+ssh://pathtorepo/dir2(   RE   t   SIMPLE_BASE(   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_urlparse.pyt   test_urljoinsi  sD    c         C   sÍ   x� d' d( d) d* d+ d, d- d. d/ d0 d1 d2 d3 d4 d5 d6 d7 d8 d9 d: d; d< d= d> g D]@ \ } } } t j | ƒ } |  j | j | j f | | f ƒ qO Wx3 d" d# d$ d% d& g D] } |  j t t j | ƒ q© Wd  S(?   Ns    http://Test.python.org:5432/foo/s   test.python.orgi8  s   http://12.34.56.78:5432/foo/s   12.34.56.78s   http://[::1]:5432/foo/s   ::1s   http://[dead:beef::1]:5432/foo/s   dead:beef::1s   http://[dead:beef::]:5432/foo/s   dead:beef::s:   http://[dead:beef:cafe:5417:affe:8FA3:deaf:feed]:5432/foo/s'   dead:beef:cafe:5417:affe:8fa3:deaf:feeds    http://[::12.34.56.78]:5432/foo/s   ::12.34.56.78s%   http://[::ffff:12.34.56.78]:5432/foo/s   ::ffff:12.34.56.78s   http://Test.python.org/foo/s   http://12.34.56.78/foo/s   http://[::1]/foo/s   http://[dead:beef::1]/foo/s   http://[dead:beef::]/foo/s5   http://[dead:beef:cafe:5417:affe:8FA3:deaf:feed]/foo/s   http://[::12.34.56.78]/foo/s    http://[::ffff:12.34.56.78]/foo/s   http://Test.python.org:/foo/s   http://12.34.56.78:/foo/s   http://[::1]:/foo/s   http://[dead:beef::1]:/foo/s   http://[dead:beef::]:/foo/s6   http://[dead:beef:cafe:5417:affe:8FA3:deaf:feed]:/foo/s   http://[::12.34.56.78]:/foo/s!   http://[::ffff:12.34.56.78]:/foo/s   http://::12.34.56.78]/s   http://[::1/foo/s   ftp://[::1/foo/bad]/bads   http://[::1/foo/bad]/bads   http://[::ffff:12.34.56.78(   s    http://Test.python.org:5432/foo/s   test.python.orgi8  (   s   http://12.34.56.78:5432/foo/s   12.34.56.78i8  (   s   http://[::1]:5432/foo/s   ::1i8  (   s   http://[dead:beef::1]:5432/foo/s   dead:beef::1i8  (   s   http://[dead:beef::]:5432/foo/s   dead:beef::i8  (   s:   http://[dead:beef:cafe:5417:affe:8FA3:deaf:feed]:5432/foo/s'   dead:beef:cafe:5417:affe:8fa3:deaf:feedi8  (   s    http://[::12.34.56.78]:5432/foo/s   ::12.34.56.78i8  (   s%   http://[::ffff:12.34.56.78]:5432/foo/s   ::ffff:12.34.56.78i8  (   s   http://Test.python.org/foo/s   test.python.orgN(   s   http://12.34.56.78/foo/s   12.34.56.78N(   s   http://[::1]/foo/s   ::1N(   s   http://[dead:beef::1]/foo/s   dead:beef::1N(   s   http://[dead:beef::]/foo/s   dead:beef::N(   s5   http://[dead:beef:cafe:5417:affe:8FA3:deaf:feed]/foo/s'   dead:beef:cafe:5417:affe:8fa3:deaf:feedN(   s   http://[::12.34.56.78]/foo/s   ::12.34.56.78N(   s    http://[::ffff:12.34.56.78]/foo/s   ::ffff:12.34.56.78N(   s   http://Test.python.org:/foo/s   test.python.orgN(   s   http://12.34.56.78:/foo/s   12.34.56.78N(   s   http://[::1]:/foo/s   ::1N(   s   http://[dead:beef::1]:/foo/s   dead:beef::1N(   s   http://[dead:beef::]:/foo/s   dead:beef::N(   s6   http://[dead:beef:cafe:5417:affe:8FA3:deaf:feed]:/foo/s'   dead:beef:cafe:5417:affe:8fa3:deaf:feedN(   s   http://[::12.34.56.78]:/foo/s   ::12.34.56.78N(   s!   http://[::ffff:12.34.56.78]:/foo/s   ::ffff:12.34.56.78N(   t   NoneR
   R   R   R   t   assertRaisest
   ValueError(   R   R   R   R   t	   urlparsedt   invalid_url(    (    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_urlparse.pyt   test_RFC2732�  sP          &c         C   sm   xf d d d d d d d d t  d d f t d d f g
 D]. \ } } } |  j t j | ƒ | | f ƒ q7 Wd  S(   Ns   http://python.org#frags   http://python.orgt   fragR   s   http://python.org/#frags   http://python.org/s   http://python.org/?q#frags   http://python.org/?qs   http://python.org/p#frags   http://python.org/ps   http://python.org/p?qs   http://a/b/c/d;p?qR=   (   s   http://python.org#frags   http://python.orgR\   (   s   http://python.orgs   http://python.orgR   (   s   http://python.org/#frags   http://python.org/R\   (   s   http://python.org/s   http://python.org/R   (   s   http://python.org/?q#frags   http://python.org/?qR\   (   s   http://python.org/?qs   http://python.org/?qR   (   s   http://python.org/p#frags   http://python.org/pR\   (   s   http://python.org/p?qs   http://python.org/p?qR   (   RK   RO   R   R
   t	   urldefrag(   R   R   t   defragR\   (    (    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_urlparse.pyt   test_urldefrag¹  s    c         C   s˜  d } t  j | ƒ } |  j | j d ƒ |  j | j d ƒ |  j | j d ƒ |  j | j d ƒ |  j | j d ƒ |  j | j d  ƒ |  j | j
 d  ƒ |  j | j d ƒ |  j | j d  ƒ d } t  j | ƒ } |  j | j d ƒ |  j | j d	 ƒ |  j | j d ƒ |  j | j d
 ƒ |  j | j d ƒ |  j | j d ƒ |  j | j
 d ƒ |  j | j d ƒ |  j | j d ƒ |  j | j ƒ  | ƒ d } t  j | ƒ } |  j | j d ƒ |  j | j d ƒ |  j | j d ƒ |  j | j d
 ƒ |  j | j d ƒ |  j | j d ƒ |  j | j
 d ƒ |  j | j d ƒ |  j | j d ƒ |  j | j ƒ  | ƒ d } t  j | ƒ } |  j | j d  ƒ d  S(   Ns   HTTP://WWW.PYTHON.ORG/doc/#fragR>   s   WWW.PYTHON.ORGs   /doc/R   R\   s   www.python.orgs7   http://User:Pass@www.python.org:080/doc/?query=yes#frags   User:Pass@www.python.org:080s	   query=yest   Usert   PassiP   sC   http://User@example.com:Pass@www.python.org:080/doc/?query=yes#frags(   User@example.com:Pass@www.python.org:080s   User@example.coms   http://www.python.org:65536(   R
   R   R   R   R   R   R   R   R   RV   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_urlparse.pyt   test_urlsplit_attributesÈ  sL    c         C   sØ   t  j d ƒ } |  j | j d ƒ |  j | j d ƒ t  j d ƒ } |  j | j d ƒ |  j | j d ƒ t  j  d ƒ } |  j | j d ƒ |  j | j d ƒ t  j  d ƒ } |  j | j d ƒ |  j | j d ƒ d  S(   Ns   tel:+31-641044153t   tels   +31-641044153s   tel:+31641044153s   +31641044153(   R
   R   R   R   R   (   R   t   p1t   p2(    (    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_urlparse.pyt   test_issue14072û  s    c         C   s$  t  j  d ƒ } |  j | j d ƒ |  j | j d ƒ |  j | j d ƒ t  j  d ƒ } |  j | j d ƒ |  j | j d ƒ |  j | j d ƒ t  j  d ƒ } |  j | j d ƒ |  j | j d	 ƒ |  j | j d
 ƒ t  j  d ƒ } |  j | j d ƒ |  j | j d ƒ |  j | j d ƒ d  S(   Ns"   tel:123-4;phone-context=+1-650-516Rc   s   123-4s   phone-context=+1-650-516s   tel:+1-201-555-0123s   +1-201-555-0123R   s"   tel:7042;phone-context=example.comt   7042s   phone-context=example.coms%   tel:863-1234;phone-context=+1-914-555s   863-1234s   phone-context=+1-914-555(   R
   R   R   R   R   (   R   Rd   (    (    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_urlparse.pyt   test_telurl_params  s     c            sz   t  j d ƒ ‰  |  j ˆ  j d ƒ |  j t ‡  f d †  ƒ t  j  d ƒ ‰  |  j ˆ  j d ƒ |  j t ‡  f d †  ƒ d S(   s$   Check handling of non-integer ports.s   http://www.example.net:foos   www.example.net:fooc              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_urlparse.pyt   <lambda>(  R   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_urlparse.pyRi   ,  R   N(   R
   R   R   R   RW   RX   (   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_urlparse.pyt   test_attributes_bad_port$  s    c         C   s  d } t  j | ƒ } |  j | j d ƒ |  j | j d  ƒ |  j | j d  ƒ |  j | j d  ƒ |  j | j d  ƒ |  j | j	 ƒ  | ƒ t  j  | ƒ } |  j | j d ƒ |  j | j d  ƒ |  j | j d  ƒ |  j | j d  ƒ |  j | j d  ƒ |  j | j	 ƒ  | ƒ d  S(   Ns0   sip:alice@atlanta.com;maddr=239.255.255.1;ttl=15R   (
   R
   R   R   R   R   RV   R   R   R   R   (   R   t   uriR;   (    (    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_urlparse.pyt   test_attributes_without_netloc.  s    c         C   s�   d } t  | ƒ } t j | ƒ t j | ƒ } |  j t | j ƒ t | ƒ ƒ |  j t | j ƒ t | ƒ ƒ |  j t | j ƒ t | ƒ ƒ d  S(   Ns   http://example.com/doc/(   t   unicodeR
   R   t   typeR   R   R   (   R   Rk   t   unicode_uriR;   (    (    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_urlparse.pyt   test_cachingE  s    c         C   s   |  j  t j d ƒ d ƒ d  S(   Ns    http://example.com?blahblah=/fooR>   s   example.comR   s   blahblah=/foo(   R>   s   example.comR   R   s   blahblah=/fooR   (   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_urlparse.pyt   test_noslashP  s    c         C   sh   |  j  t j d ƒ d ƒ |  j  t j d ƒ d ƒ |  j  t j d ƒ d ƒ |  j  t j d ƒ d ƒ d  S(   Ns   s3://foo.com/stufft   s3s   foo.coms   /stuffR   s   x-newscheme://foo.com/stuffs   x-newschemes*   x-newscheme://foo.com/stuff?query#fragmentR   R   s!   x-newscheme://foo.com/stuff?query(   Rr   s   foo.coms   /stuffR   R   R   (   s   x-newschemes   foo.coms   /stuffR   R   R   (   s   x-newschemes   foo.coms   /stuffR   R   R   (   s   x-newschemes   foo.coms   /stuffR   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_urlparse.pyt   test_anyschemeU  s    c         C   sO   |  j  t j d ƒ d ƒ |  j  t j d ƒ d ƒ |  j  t j d ƒ d	 ƒ d  S(
   NR   R   s   //www.python.org:80s   www.python.org:80s   http://www.python.org:80R>   (   R   R   R   R   R   R   (   R   s   www.python.org:80R   R   R   R   (   R>   s   www.python.org:80R   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_urlparse.pyt   test_withoutscheme`  s    c         C   sh   |  j  t j d ƒ d	 ƒ |  j  t j d ƒ d
 ƒ |  j  t j d ƒ d ƒ |  j  t j d ƒ d ƒ d  S(   Ns   path:80R   s   http:R>   s   https:R?   s   http://www.python.org:80s   www.python.org:80(   R   R   s   path:80R   R   R   (   R>   R   R   R   R   R   (   R?   R   R   R   R   R   (   R>   s   www.python.org:80R   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_urlparse.pyt   test_portseparatorl  s    c   	   
   C   s°  d } d „  | Dƒ } g  t  t t d t j ƒ ƒ D]7 } | t t j | ƒ j ƒ  ƒ @r2 | | k r2 | ^ q2 } |  j	 d | ƒ |  j	 d | ƒ t
 j d ƒ |  j t ƒ � t
 j d ƒ Wd  QXx’ d d	 d
 g D]� } xx d d g D]j } xa | D]Y } d j | | j | ƒ ƒ } t j r%d | GHn  |  j t ƒ � t
 j | ƒ Wd  QXqï Wqâ WqÏ W|  j t ƒ � } t
 j d ƒ Wd  QX|  j t | j ƒ d ƒ |  j | j j d t ƒ d  S(   Nu   /:#?@c         S   s%   h  |  ] } d  j  t | ƒ ƒ ’ q S(   s   {:04X}(   t   formatt   ord(   t   .0t   c(    (    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_urlparse.pys	   <setcomp>z  s   	 i€   u   â„€u   ï¼ƒu   http://ãƒ•ã‚š:80u   http://ãƒ•ã‚šï¸“80u   httpu   httpsu   ftpu   netloc{}false.netlocu   n{}user@netlocu   {}://{}/paths   Checking %ru   http://example.comï¼ƒ@bing.comsY   netloc u'example.com\uff03@bing.com' contains invalid characters under NFKC normalizationi    (   t   mapt   unichrt   ranget   syst
   maxunicodet   sett   unicodedatat   decompositionR   t   assertInR
   R   RW   RX   Rv   R    t   verboseR   t   strt	   exceptiont   assertIsInstancet   args(	   R   t   illegal_charst	   hex_charsRy   t   denorm_charsR   R   R   t   cm(    (    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_urlparse.pyt   test_urlsplit_normalizationu  s.    "	(   t   __name__t
   __module__R"   R-   R1   R8   R@   RE   RH   RL   RN   RP   RR   RU   R[   R_   Rb   Rf   Rh   Rj   Rl   Rp   Rq   Rs   Rt   Ru   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_urlparse.pyR	   H   s2   	3			
					-		*	:	$	,		3			
							c           C   s   t  j t ƒ d  S(   N(   R    t   run_unittestR	   (    (    (    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_urlparse.pyt	   test_mainœ  s    t   __main__(   t   testR    R}   R€   t   unittestR
   RK   RO   RQ   RT   R$   R.   t   TestCaseR	   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_urlparse.pyt   <module>   s‚   							!										ÿ ÿ V	