Current File : //opt/imh-python/lib/python2.7/test/test_zipimport_support.pyc |
�
��Wc @ 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
m Z m Z m Z m Z m Z m Z e j j Z d d l m Z m Z m Z m Z d d l m Z d � Z d e f d � � YZ d � Z e d k r:e � n d S(
i����N( t spawn_pythont kill_pythont
run_pythont temp_dirt make_scriptt make_zip_script( t test_doctestt sample_doctestt sample_doctest_no_doctestst sample_doctest_no_docstrings( t ImportHooksBaseTestCasec C s t j } t j j � t _ z� t j d t d t � } t j d t � } y d | j
| j f } Wn t k
r~ | j } n Xx* | j
| | | � D] } | j | � q� W| j | j } } | r� t j j d | | f � � n Wd | t _ Xt r
d | j | f GHn | | f S( Nt verboset recurses %s.%ss %d of %d doctests faileds, doctest (%s) ... %d tests with zero failures( t syst stdoutt testt test_supportt get_original_stdoutt doctestt
DocTestFinderR t Falset
DocTestRunnert
__module__t __name__t AttributeErrort findt runt failurest triest
TestFailed( t objt modulet save_stdoutt findert runnert namet examplet ft t( ( st /builddir/build/BUILDROOT/imh-python-2.7.12-1.el7.x86_64/opt/imh-python/lib/python2.7/test/test_zipimport_support.pyt _run_object_doctest% s$
#
t ZipSupportTestsc B s5 e Z d � Z d � Z d � Z d � Z d � Z RS( c C s( t j � t j j � t j | � d S( N( t linecachet
clearcachet zipimportt _zip_directory_cachet clearR
t setUp( t self( ( st /builddir/build/BUILDROOT/imh-python-2.7.12-1.el7.x86_64/opt/imh-python/lib/python2.7/test/test_zipimport_support.pyR. F s
c C s� d } t � �� } t | d | � } t j j d t j j | � � } t | d | | � \ } } t j | � t j j d | � d d l
} | j t j
| j � | � Wd QXd S( Ns def foo(): pass
t __init__t zip_pkgt test_zipi i����( R R t ost patht joint basenameR t removeR
t insertR1 t assertEqualt inspectt getsourcet foo( R/ t test_srct dt init_namet name_in_zipt zip_namet run_nameR1 ( ( st /builddir/build/BUILDROOT/imh-python-2.7.12-1.el7.x86_64/opt/imh-python/lib/python2.7/test/test_zipimport_support.pyt test_inspect_getsource_issue4223L s
c % C s8 t j t � } | j d d � } | j d d � } | j d d � } i } xj t t t g D]Y } t j | � } | j d d � } | j j d � d } | j d d
� } | | | <q[ Wt � �q} t
| d | � } t | d | � \ } } t j
| d � }
x. | j � D] \ } } |
j | d
| � q
W|
j � t rst j
| d � } d | GH| j � | j � n t j | � t j j d | � d d l } | 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"