ó
wŪjc           @   s  d  d l  Z  d  d l Z d  d l Z d  d l Z d  d l Z d  d l Z d  d l Z d  d l Z d  d l Z d  d l	 Z	 d  d l
 Z
 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 m Z m Z m Z m Z m Z d  d l m Z e j j r3d# Z n d$ Z d	 j    Z! e" d
   e D  Z# d j    Z$ e" d   e D  Z% d Z& d Z' d   Z( d   Z) d   Z* d   Z+ d   Z, d e j- f d     YZ. d e j- f d     YZ/ d e. f d     YZ0 d e j- f d     YZ1 e j2 e j j3 d  d e j- f d     Y Z4 d e j- f d      YZ5 d!   Z6 e7 d" k re6   n  d S(%   i’’’’N(   t
   namedtuple(   t   assert_python_ok(   t   TESTFNt   rmtreet   reap_childrent   captured_stdoutt   captured_stderrt   requires_docstrings(   t	   pydoc_mods.   dictionary for instance variables (if defined)s2   list of weak references to the object (if defined)t    s«  
NAME
    test.pydoc_mod - This is a test module for test_pydoc

FILE
    %s
%s
CLASSES
    __builtin__.object
        B
        C
    A
    
    class A
     |  Hello and goodbye
     |  
     |  Methods defined here:
     |  
     |  __init__()
     |      Wow, I have no function!
    
    class B(__builtin__.object)
     |  Data descriptors defined here:
     |  
     |  __dict__%s
     |  
     |  __weakref__%s
     |  
     |  ----------------------------------------------------------------------
     |  Data and other attributes defined here:
     |  
     |  NO_MEANING = 'eggs'
    
    class C(__builtin__.object)
     |  Methods defined here:
     |  
     |  get_answer(self)
     |      Return say_no()
     |  
     |  is_it_true(self)
     |      Return self.get_answer()
     |  
     |  say_no(self)
     |  
     |  ----------------------------------------------------------------------
     |  Data descriptors defined here:
     |  
     |  __dict__
     |      dictionary for instance variables (if defined)
     |  
     |  __weakref__
     |      list of weak references to the object (if defined)

FUNCTIONS
    doc_func()
        This function solves all of the world's problems:
        hunger
        lack of Python
        war
    
    nodoc_func()

DATA
    __author__ = 'Benjamin Peterson'
    __credits__ = 'Nobody'
    __version__ = '1.2.3.4'

VERSION
    1.2.3.4

AUTHOR
    Benjamin Peterson

CREDITS
    Nobody
c         c   s%   |  ] } | r d  | n d Vq d S(   s   
     |      R	   N(    (   t   .0t   s(    (    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_pydoc.pys	   <genexpr>n   s   sg  
<table width="100%%" cellspacing=0 cellpadding=2 border=0 summary="heading">
<tr bgcolor="#7799ee">
<td valign=bottom>&nbsp;<br>
<font color="#ffffff" face="helvetica, arial">&nbsp;<br><big><big><strong><a href="test.html"><font color="#ffffff">test</font></a>.pydoc_mod</strong></big></big> (version 1.2.3.4)</font></td
><td align=right valign=bottom
><font color="#ffffff" face="helvetica, arial"><a href=".">index</a><br><a href="file:%s">%s</a>%s</font></td></tr></table>
    <p><tt>This&nbsp;is&nbsp;a&nbsp;test&nbsp;module&nbsp;for&nbsp;test_pydoc</tt></p>
<p>
<table width="100%%" cellspacing=0 cellpadding=2 border=0 summary="section">
<tr bgcolor="#ee77aa">
<td colspan=3 valign=bottom>&nbsp;<br>
<font color="#ffffff" face="helvetica, arial"><big><strong>Classes</strong></big></font></td></tr>
    
<tr><td bgcolor="#ee77aa"><tt>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</tt></td><td>&nbsp;</td>
<td width="100%%"><dl>
<dt><font face="helvetica, arial"><a href="__builtin__.html#object">__builtin__.object</a>
</font></dt><dd>
<dl>
<dt><font face="helvetica, arial"><a href="test.pydoc_mod.html#B">B</a>
</font></dt><dt><font face="helvetica, arial"><a href="test.pydoc_mod.html#C">C</a>
</font></dt></dl>
</dd>
<dt><font face="helvetica, arial"><a href="test.pydoc_mod.html#A">A</a>
</font></dt></dl>
 <p>
<table width="100%%" cellspacing=0 cellpadding=2 border=0 summary="section">
<tr bgcolor="#ffc8d8">
<td colspan=3 valign=bottom>&nbsp;<br>
<font color="#000000" face="helvetica, arial"><a name="A">class <strong>A</strong></a></font></td></tr>
    
<tr bgcolor="#ffc8d8"><td rowspan=2><tt>&nbsp;&nbsp;&nbsp;</tt></td>
<td colspan=2><tt>Hello&nbsp;and&nbsp;goodbye<br>&nbsp;</tt></td></tr>
<tr><td>&nbsp;</td>
<td width="100%%">Methods defined here:<br>
<dl><dt><a name="A-__init__"><strong>__init__</strong></a>()</dt><dd><tt>Wow,&nbsp;I&nbsp;have&nbsp;no&nbsp;function!</tt></dd></dl>

</td></tr></table> <p>
<table width="100%%" cellspacing=0 cellpadding=2 border=0 summary="section">
<tr bgcolor="#ffc8d8">
<td colspan=3 valign=bottom>&nbsp;<br>
<font color="#000000" face="helvetica, arial"><a name="B">class <strong>B</strong></a>(<a href="__builtin__.html#object">__builtin__.object</a>)</font></td></tr>
    
<tr><td bgcolor="#ffc8d8"><tt>&nbsp;&nbsp;&nbsp;</tt></td><td>&nbsp;</td>
<td width="100%%">Data descriptors defined here:<br>
<dl><dt><strong>__dict__</strong></dt>
<dd><tt>%s</tt></dd>
</dl>
<dl><dt><strong>__weakref__</strong></dt>
<dd><tt>%s</tt></dd>
</dl>
<hr>
Data and other attributes defined here:<br>
<dl><dt><strong>NO_MEANING</strong> = 'eggs'</dl>

</td></tr></table> <p>
<table width="100%%" cellspacing=0 cellpadding=2 border=0 summary="section">
<tr bgcolor="#ffc8d8">
<td colspan=3 valign=bottom>&nbsp;<br>
<font color="#000000" face="helvetica, arial"><a name="C">class <strong>C</strong></a>(<a href="__builtin__.html#object">__builtin__.object</a>)</font></td></tr>
    
<tr><td bgcolor="#ffc8d8"><tt>&nbsp;&nbsp;&nbsp;</tt></td><td>&nbsp;</td>
<td width="100%%">Methods defined here:<br>
<dl><dt><a name="C-get_answer"><strong>get_answer</strong></a>(self)</dt><dd><tt>Return&nbsp;<a href="#C-say_no">say_no</a>()</tt></dd></dl>

<dl><dt><a name="C-is_it_true"><strong>is_it_true</strong></a>(self)</dt><dd><tt>Return&nbsp;self.<a href="#C-get_answer">get_answer</a>()</tt></dd></dl>

<dl><dt><a name="C-say_no"><strong>say_no</strong></a>(self)</dt></dl>

<hr>
Data descriptors defined here:<br>
<dl><dt><strong>__dict__</strong></dt>
<dd><tt>dictionary&nbsp;for&nbsp;instance&nbsp;variables&nbsp;(if&nbsp;defined)</tt></dd>
</dl>
<dl><dt><strong>__weakref__</strong></dt>
<dd><tt>list&nbsp;of&nbsp;weak&nbsp;references&nbsp;to&nbsp;the&nbsp;object&nbsp;(if&nbsp;defined)</tt></dd>
</dl>
</td></tr></table></td></tr></table><p>
<table width="100%%" cellspacing=0 cellpadding=2 border=0 summary="section">
<tr bgcolor="#eeaa77">
<td colspan=3 valign=bottom>&nbsp;<br>
<font color="#ffffff" face="helvetica, arial"><big><strong>Functions</strong></big></font></td></tr>
    
<tr><td bgcolor="#eeaa77"><tt>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</tt></td><td>&nbsp;</td>
<td width="100%%"><dl><dt><a name="-doc_func"><strong>doc_func</strong></a>()</dt><dd><tt>This&nbsp;function&nbsp;solves&nbsp;all&nbsp;of&nbsp;the&nbsp;world's&nbsp;problems:<br>
hunger<br>
lack&nbsp;of&nbsp;Python<br>
war</tt></dd></dl>
 <dl><dt><a name="-nodoc_func"><strong>nodoc_func</strong></a>()</dt></dl>
</td></tr></table><p>
<table width="100%%" cellspacing=0 cellpadding=2 border=0 summary="section">
<tr bgcolor="#55aa55">
<td colspan=3 valign=bottom>&nbsp;<br>
<font color="#ffffff" face="helvetica, arial"><big><strong>Data</strong></big></font></td></tr>
    
<tr><td bgcolor="#55aa55"><tt>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</tt></td><td>&nbsp;</td>
<td width="100%%"><strong>__author__</strong> = 'Benjamin Peterson'<br>
<strong>__credits__</strong> = 'Nobody'<br>
<strong>__version__</strong> = '1.2.3.4'</td></tr></table><p>
<table width="100%%" cellspacing=0 cellpadding=2 border=0 summary="section">
<tr bgcolor="#7799ee">
<td colspan=3 valign=bottom>&nbsp;<br>
<font color="#ffffff" face="helvetica, arial"><big><strong>Author</strong></big></font></td></tr>
    
<tr><td bgcolor="#7799ee"><tt>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</tt></td><td>&nbsp;</td>
<td width="100%%">Benjamin&nbsp;Peterson</td></tr></table><p>
<table width="100%%" cellspacing=0 cellpadding=2 border=0 summary="section">
<tr bgcolor="#7799ee">
<td colspan=3 valign=bottom>&nbsp;<br>
<font color="#ffffff" face="helvetica, arial"><big><strong>Credits</strong></big></font></td></tr>
    
<tr><td bgcolor="#7799ee"><tt>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</tt></td><td>&nbsp;</td>
<td width="100%%">Nobody</td></tr></table>
c         c   s!   |  ] } | j  d  d  Vq d S(   t    s   &nbsp;N(   t   replace(   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_pydoc.pys	   <genexpr>å   s   s&   no Python documentation found for '%s'sC   problem in %s - <type 'exceptions.ImportError'>: No module named %sc         O   s8   | |  f } t  d t j | |  \ } } } | j   S(   sW   
    Runs pydoc on the specified module. Returns the stripped
    output of pydoc.
    s   -B(   R   t   pydoct   __file__t   strip(   t   module_namet   argst   envt   rct   outt   err(    (    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_pydoc.pyt	   run_pydocī   s    !c         C   sW   t  j   } | j |   } | j t  p- d } | rG d | d } n  | j   | f S(   s&   Returns pydoc generated output as htmlR	   s   <br><a href="s   ">Module Docs</a>(   R   t   HTMLDoct	   docmodulet	   getdoclocR   R   (   t   modulet   doct   outputt   loc(    (    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_pydoc.pyt   get_pydoc_htmlų   s    c         C   sO   t  j j } | | t  j j t    } t j   } | j |  d | } | S(   s,   Returns a documentation web link of a modulet   basedir(   t   ost   patht   dirnamet   realpathR   R   t   TextDocR   (   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_pydoc.pyt   get_pydoc_link  s
    c         C   sx   t  j   } | j t  p d } | r8 d | d } n  | j |   } t j d  } | j d |  } | j   | f S(   s&   Returns pydoc generated output as textR	   s   
MODULE DOCS
    s   
s   .(	   R   R%   R   R   R   t   ret   compilet   subR   (   R   R   R   R   t   patt(    (    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_pydoc.pyt   get_pydoc_text	  s    c      	   C   sX   |  j  t  } | j  t  } t j | | d d d d d d } d d j |  GHd	 S(
   s"   Prints unified diffs for two textst   ni    t   fromfilet   expectedt   tofilet   gots   
R	   N(   t
   splitlinest   Truet   difflibt   unified_difft   join(   t   text1t   text2t   lines1t   lines2t   diffs(    (    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_pydoc.pyt   print_diffs  s
    	t   PydocBaseTestc           B   s)   e  Z d d   Z e j d d   Z RS(   c            s:   | p t  j j t  g   d d d    f d  } | S(   si   
        A version of pkgutil.walk_packages() that will restrict itself to
        a given path.
        R	   c            s    |  p   | |  S(   N(    (   R"   t   prefixt   onerror(   t   default_patht   walk_packages(    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_pydoc.pyt   wrapper(  s    N(   R!   R"   R#   R   t   None(   t   selfR@   R"   RA   (    (   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_pydoc.pyt   _restricted_walk_packages"  s    c         c   s8   t  j } |  j | |  t  _ z	 d  VWd  | t  _ Xd  S(   N(   t   pkgutilR@   RD   (   RC   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_pydoc.pyt   restrict_walk_packages,  s    			N(   t   __name__t
   __module__RB   RD   t
   contextlibt   contextmanagerRF   (    (    (    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_pydoc.pyR<      s   
t   PydocDocTestc           B   sŃ   e  Z e e j e j j d  k d  d     Z e e j e j j d  k d  d     Z	 d   Z
 d   Z d   Z d   Z d   Z d	   Z d
   Z d   Z e j e j j d  k d  d    Z RS(   i   s)   Docstrings are omitted with -O2 and abovec         C   s   t  t  \ } } t j t  } t j d k rN d d  l } | j |  } n | } t | | | f t	 } | | k r t
 | |  |  j d  n  d  S(   Nt   win32i’’’’s%   outputs are not equal, see diff above(   R   R   t   inspectt
   getabsfilet   syst   platformt
   nturl2patht   pathname2urlt   expected_html_patternt   expected_html_data_docstringsR;   t   fail(   RC   t   resultt   doc_loct   mod_fileRQ   t   mod_urlt   expected_html(    (    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_pydoc.pyt   test_html_doc9  s    c         C   s\   t  t  \ } } t t j t  | f t } | | k rX t | |  |  j d  n  d  S(   Ns%   outputs are not equal, see diff above(   R+   R   t   expected_text_patternRM   RN   t   expected_text_data_docstringsR;   RU   (   RC   RV   RW   t   expected_text(    (    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_pydoc.pyt   test_text_docK  s    c         C   s&   t  t j j  } |  j d |  d  S(   Ns   xml.etree.elementtree(   R&   t   xmlt   etreet   ElementTreet   assertIn(   RC   t   doc_link(    (    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_pydoc.pyt,   test_mixed_case_module_names_are_lower_casedW  s    c         C   s,   t  t j  \ } } |  j | d d  d  S(   NR	   s'   MODULE DOCS incorrectly includes a link(   R+   R`   Ra   t   assertEqual(   RC   RV   RW   (    (    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_pydoc.pyt   test_issue8225\  s    c         C   s1   t  j } z d  t  _ t j   Wd  | t  _ Xd  S(   N(   RO   t   stdinRB   R   t   getpager(   RC   t   previous_stdin(    (    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_pydoc.pyt   test_getpager_with_stdin_nonea  s
    		c         C   sj   d d d     Y} d d d     Y} t  j |    } t  j |    } |  j | j d d  |  d  S(   Nt   Ac           B   s   e  Z d  Z  RS(   i*   (   RG   RH   (    (    (    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_pydoc.pyRl   l  s   t   Bc           B   s   e  Z RS(    (   RG   RH   (    (    (    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_pydoc.pyRm   n  s   (    (    (   R   t
   render_docRf   R   (   RC   Rl   Rm   t   adoct   bdoc(    (    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_pydoc.pyt   test_non_str_namei  s
    c         C   s3   d } t  |  } t | } |  j | | d  d  S(   Ns   test.i_am_not_heres&   documentation for missing module found(   R   t   missing_patternRf   (   RC   t   missing_moduleRV   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_pydoc.pyt   test_not_heret  s
    
c         C   s9   d } t  |  } t | j   } |  j | | d  d  S(   Ns    test.i_am_not_here sL   white space was not stripped from module name or other error output mismatch(   R   Rr   R   Rf   (   RC   Rs   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_pydoc.pyt   test_input_strip{  s
    c         C   se   t  j } |  j | d  d  |  j | d  d  |  j | d  d  |  j | d  d  d  S(   Ns   <function stripid at 0x88dcee4>s   <function stripid>s    <function stripid at 0x01F65390>t   42s   <type 'exceptions.Exception'>(   R   t   stripidRf   (   RC   Rw   (    (    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_pydoc.pyt   test_stripid  s    	c      
   C   s   t  j j   p } t j j | d  } t | d   } | j d  Wd  QXt j	 |  t
 j | i   } |  j | d  Wd  QXd  S(   Ns   dt.pyt   ws$   """
my doc

second line
"""
foo = 1
s   my doc(   t   testt   test_supportt   temp_cwdR!   R"   R5   t   opent   writet
   py_compileR(   R   t   synopsisRf   (   RC   t   test_dirt	   init_patht   fobjR   (    (    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_pydoc.pyt   test_synopsis  s    s)   Docstrings are omitted with -OO and abovec      
   C   s¶   t  j j   ” } t j j | d  } t j j | d  } t | d   } | j d  Wd  QXt j	 |  t
 j | i   } |  j |  t
 j | i   } |  j |  Wd  QXd  S(   Ns   foomod42.pys   foomod42.pycRy   s   foo = 1(   Rz   R{   R|   R!   R"   R5   R}   R~   R   R(   R   R   t   assertIsNone(   RC   R   R   t   cached_pathR   R   t   synopsis_cached(    (    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_pydoc.pyt"   test_synopsis_sourceless_empty_doc   s    (   RG   RH   R   t   unittestt   skipIfRO   t   flagst   optimizeR[   R_   Re   Rg   Rk   Rq   Rt   Ru   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_pydoc.pyRK   7  s    
								t   PydocImportTestc           B   s,   e  Z d    Z d   Z d   Z d   Z RS(   c         C   s&   t  j t  |  _ |  j t t  d  S(   N(   R!   t   mkdirR   R   t
   addCleanupR   (   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_pydoc.pyt   setUp±  s    c   	      C   sŻ   d } d d d d j  |  d j  |  f d j  |  | f f } t j j t |  t j d	 } xt | D]l \ } } t | d
   } | j d j  |   Wd  QXt | d t } t	 | | f } |  j
 | |  qi Wd  S(   Nt   testmod_xyzzyt   i_am_not_heres   test.i_am_not_here_eithert   i_am_not_here_eithers   test.i_am_not_here.neither_am_is   i_am_not_here.neither_am_is   i_am_not_here.{}s   test.{}t   pyRy   s
   import {}
t
   PYTHONPATH(   R   R   (   s   test.i_am_not_here_eitherR   (   s   test.i_am_not_here.neither_am_is   i_am_not_here.neither_am_i(   t   formatR!   R"   R5   R   t   extsepR}   R~   R   t   badimport_patternRf   (	   RC   t   modnamet	   testpairst   sourcefnt   importstringt   expectedinmsgt   fRV   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_pydoc.pyt   test_badimportµ  s     c         C   sG  t  j j t d  } t  j |  t  j j | d  t  j d } t | d   } | j d  Wd  QX|  j d t g  Å t	   & } t
    } t j d  Wd  QXWd  QX|  j | j   d  |  j | j   d  t	   & } t
    } t j d  Wd  QXWd  QX|  j | j   j   d  |  j | j   d  Wd  QXd  S(	   Nt	   syntaxerrt   __init__R   Ry   s   invalid python syntax = $1
R"   t   xyzzyR	   (   R!   R"   R5   R   R   R   R}   R~   RF   R   R   R   t   aproposRf   t   getvalueR   (   RC   t   pkgdirt	   badsyntaxR   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_pydoc.pyt   test_apropos_with_bad_packageĖ  s      c         C   s¾   t  j j t d  |  _ t  j |  j d  |  j t  j |  j  |  j d t g  6 t	   & } t
    } t j d  Wd  QXWd  QXWd  QX|  j | j   d  |  j | j   d  d  S(   Nt
   unreadablei    R"   t   SOMEKEYR	   (   R!   R"   R5   R   t   unreadable_dirR   R   t   rmdirRF   R   R   R   R£   Rf   R¤   (   RC   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_pydoc.pyt    test_apropos_with_unreadable_dirą  s    (   RG   RH   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_pydoc.pyR   Æ  s   			t   TestDescriptionsc           B   s,   e  Z d    Z d   Z d   Z d   Z RS(   c         C   s3   d d l  m } t j |  } |  j d |  d  S(   Ni’’’’(   t   pydocfodderR®   (   Rz   R®   R   Rn   Rc   (   RC   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_pydoc.pyt   test_moduleņ  s    c         C   su   d d d     Y} |   } |  j  t j |  d  |  j  t j |  d  d t } |  j | t j |   d  S(   Nt   Cc           B   s   e  Z d  Z RS(   s   Classic class(   RG   RH   t   __doc__(    (    (    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_pydoc.pyR°   ł  s    s   class Cs   instance of Cs   instance of C in module %s(    (   Rf   R   t   describeRG   Rc   Rn   (   RC   R°   t   cR.   (    (    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_pydoc.pyt   test_classic_classų  s    	
c         C   sx   d t  f d     Y} |   } |  j t j |  d  |  j t j |  d  d t } |  j | t j |   d  S(   NR°   c           B   s   e  Z d  Z RS(   s   New-style class(   RG   RH   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_pydoc.pyR°     s    s   class Cs   C in module %s object(   t   objectRf   R   R²   RG   Rc   Rn   (   RC   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_pydoc.pyt
   test_class   s    	
c         C   sz   t  d d d g d t } t    } t j |  Wd  QX| j   } |  j d |  |  j d |  |  j d |  d  S(   Nt   NTt   abct   deft   renamet   _1t   _replacet   _asdict(   R    R2   R   R   t   helpR¤   Rc   (   RC   R·   t   help_iot   helptext(    (    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_pydoc.pyt!   test_namedtuple_public_underscore	  s    (   RG   RH   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_pydoc.pyR­   š  s   				s   test requires unicode supportt   TestUnicodec           B   sP   e  Z d    Z d   Z d   Z d   Z d   Z d   Z d   Z d   Z	 RS(   c         C   s   t  j d d j d   |  _ d j d  |  j _ d j d  |  j _ d j d  |  j _ d j d  |  j _ |  j |  j j	 t
  d  S(   Nt   Qs   Rational numbers: āt   utf8s   ā(   t   typest
   ModuleTypet   decodeRĆ   t   __version__t   __date__t
   __author__t   __credits__t   assertIsInstanceR±   t   unicode(   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_pydoc.pyR     s    c         C   s&   t  j |  j  } |  j | t  d  S(   N(   R   Rn   RĆ   RĢ   t   str(   RC   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_pydoc.pyt   test_render_doc$  s    c         C   s&   |  j  t j |  j j d  d  d  S(   Nt   asciis   Rational numbers: &#8474;(   Rf   R   t   _encodeRĆ   R±   (   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_pydoc.pyt   test_encode)  s    c         C   s   t  j |  j  } t j t } t _ zO t j j   : t  j	 | d  |  j
 t d  j   t  j |   Wd  QXWd  | t _ Xd  S(   Nt   pipe(   R   Rn   RĆ   R!   t   popenR}   Rz   R{   R|   t	   pipepagerRf   t   readRŃ   (   RC   R   t   saved(    (    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_pydoc.pyt   test_pipepager-  s    /c            s   t  j  j  } i       f d   } t j | } t _ z1 t  j | d   j   d t  j |   Wd  | t _ Xd  S(   Nc            sK   |  j    d d !}  j d | d |  j     t |  j     d <d  S(   Ni   i’’’’t   "t   content(   R   Rf   R}   RÖ   (   t   cmdt   filename(   R   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_pydoc.pyt   mock_system>  s    R	   RŚ   (   R   Rn   RĆ   R!   t   systemt   tempfilepagerRf   RŃ   (   RC   R   RŻ   R×   (    (   R   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_pydoc.pyt   test_tempfilepager9  s    !c         C   s   t  j |  j  } t j j   j t d d  8 } t j | } t _ z t  j	 |  Wd  | t _ XWd  QX|  j
 d t d  j    Wd  QXd  S(   NR   Ry   s   Rational numbers:(   R   Rn   RĆ   Rz   R{   R|   R}   RO   t   stdoutt
   plainpagerRc   RÖ   (   RC   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_pydoc.pyt   test_plainpagerI  s    c         C   s§   t  j |  j  } t j j    t j j   j t d d  8 } t j	 | } t _	 z t  j
 |  Wd  | t _	 XWd  QX|  j d t d  j    Wd  QXWd  QXd  S(   NR   Ry   s   Rational numbers:(   R   Rn   RĆ   Rz   R{   R|   t   captured_stdinR}   RO   Rį   t   ttypagerRc   RÖ   (   RC   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_pydoc.pyt   test_ttypagerY  s     c      
   C   sR   t  j j   ' t    } t j |  j  Wd  QXWd  QX|  j | j   d  d  S(   Ns   wrote Q.html
(	   Rz   R{   R|   R   R   t   writedocRĆ   Rf   R¤   (   RC   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_pydoc.pyt   test_htmlpagef  s    (
   RG   RH   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_pydoc.pyRĀ     s   							t
   TestHelperc           B   s   e  Z d    Z d   Z RS(   c         C   s)   |  j  t t j j  t t j   d  S(   N(   Rf   t   sortedR   t   Helpert   keywordst   keywordt   kwlist(   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_pydoc.pyt   test_keywordsn  s    c         C   s£   x_ d D]W } |  j  t j |   y t j |  Wq t k
 r] |  j d j |   q Xq Wx: d D]2 } |  j t j |   |  j t t j |  qi Wd  S(   NRĪ   s   str.translates   __builtin__.strs   __builtin__.str.translates   finding the doc of {!r} failedt   not__builtin__t   strrrs   strr.translates   str.trrrranslates   __builtin__.strrrs   __builtin__.str.trrranslate(   RĪ   s   str.translates   __builtin__.strs   __builtin__.str.translate(   Rš   Rń   s   strr.translates   str.trrrranslates   __builtin__.strrrs   __builtin__.str.trrranslate(	   t   assertIsNotNoneR   t   locateRn   t   ImportErrorRU   R   R   t   assertRaises(   RC   t   name(    (    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_pydoc.pyt   test_builtinr  s    
 
(   RG   RH   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_pydoc.pyRé   m  s   	c           C   s/   z  t  j j t t t t t  Wd  t   Xd  S(   N(	   Rz   R{   t   run_unittestRK   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_pydoc.pyt	   test_main  s    t   __main__(   s.   dictionary for instance variables (if defined)s2   list of weak references to the object (if defined)(   R	   R	   (8   R!   RO   R3   t   __builtin__R'   R   R   RI   RM   Rķ   RE   R   t	   xml.etreeR`   RÅ   t   test.test_supportRz   t   xml.etree.ElementTreet   collectionsR    t   test.script_helperR   R   R   R   R   R   R   R   R{   t   HAVE_DOCSTRINGSt   expected_data_docstringsR   R\   t   tupleR]   RS   RT   Rr   R   R   R   R&   R+   R;   t   TestCaseR<   RK   R   R­   t
   skipUnlesst   have_unicodeRĀ   Ré   Rł   RG   (    (    (    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_pydoc.pyt   <module>   s^   . 	N	t		
						xA#	X	
