ó
{fc @ sr d d l Z d d l Z d d l Z d d l Z d d l Z d e j f d „ ƒ YZ e d k rn e j ƒ n d S( iÿÿÿÿNt
TestDiscoveryc 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 RS(
c C se t j ƒ } d | _ | j d ƒ } | j | d ƒ t s> d S| j t ƒ | j d ƒ Wd QXd S( Ns /foos /foo/bar/baz.pys bar.bazs /bar/baz.py( t unittestt
TestLoadert _top_level_dirt _get_name_from_patht assertEqualt __debug__t assertRaisest AssertionError( t selft loadert name( ( s4 /usr/lib64/python2.7/unittest/test/test_discovery.pyt test_get_name_from_path s c sˆ t j ƒ } t j ‰ ‡ f d † } t j j ‰ ‡ f d † } t j j ‰ ‡ f d † } d d d d d d d
g d d g g ‰ ‡ f d
† t _ | j | ƒ d „ } | t j _ | j | ƒ d „ } | t j _ | j | ƒ d „ | _ d „ | _ t j j
d ƒ } | | _ t | j
| d ƒ ƒ } g d D] } | d ^ q6}
|
j g d D] } d | d ^ qYƒ | j | |
ƒ d S( Nc s
ˆ t _ d S( N( t ost listdir( ( t original_listdir( s4 /usr/lib64/python2.7/unittest/test/test_discovery.pyt restore_listdir s c s ˆ t j _ d S( N( R
t patht isfile( ( t original_isfile( s4 /usr/lib64/python2.7/unittest/test/test_discovery.pyt restore_isfile! s c s ˆ t j _ d S( N( R
R t isdir( ( t original_isdir( s4 /usr/lib64/python2.7/unittest/test/test_discovery.pyt
restore_isdir$ s s test1.pys test2.pys
not_a_test.pyt test_dirs test.foos test-not-a-module.pyt another_dirs test3.pys test4.pyc s
ˆ j d ƒ S( Ni ( t pop( R ( t
path_lists( s4 /usr/lib64/python2.7/unittest/test/test_discovery.pyt