/opt/alt/python27/lib/python2.7/site-packages/nose
Edit: /opt/alt/python27/lib/python2.7/site-packages/nose/importer.pyo (5762B)
Ñò
¥µSSc @ sÉ d Z d d k Z d d k Z d d k Z d d k l Z d d k l Z l Z l Z l
Z
e i e ƒ Z
y e i i Z Wn e j
o d „ Z n Xd e f d „ ƒ YZ d d „ Z d „ Z d S(
s: Implements an importer that looks only in specific path (ignoring
sys.path), and uses a per-path cache in addition to sys.modules. This is
necessary because test modules in different directories frequently have the
same names, which means that the first loaded would mask the rest when using
the builtin importer.
iÿÿÿÿN( t Config( t find_modulet load_modulet acquire_lockt release_lockc C s: t i i t i i | ƒ ƒ t i i t i i | ƒ ƒ j S( N( t ost patht normcaset realpath( t srct dst( ( s> /opt/alt/python27/lib/python2.7/site-packages/nose/importer.pyt _samefile s t Importerc B s> e Z d Z d d „ Z d „ Z d „ Z d „ Z d „ Z RS( s³ An importer class that does only path-specific imports. That
is, the given module is not searched for on sys.path, but only at
the path or in the directory specified.
c C s' | d j o
t ƒ } n | | _ d S( N( t NoneR t config( t selfR ( ( s> /opt/alt/python27/lib/python2.7/site-packages/nose/importer.pyt __init__ s
c C s‹ t i i t i i | ƒ ƒ i t i ƒ } | i d ƒ } | d d j o | i ƒ n | t | ƒ } t i i | ƒ } | i | | ƒ S( sÌ Import a dotted-name package whose tail is at path. In other words,
given foo.bar and path/to/foo/bar.py, import foo from path/to/foo then
bar from path/to/foo/bar, returning bar.
t .iÿÿÿÿs __init__.py(
R R t normpatht abspatht splitt sept popt lent joint
importFromDir( R R t fqnamet
path_partst
name_partst dir_path( ( s> /opt/alt/python27/lib/python2.7/site-packages/nose/importer.pyt importFromPath" s *c
C s t i i t i i | ƒ ƒ } t i d | | ƒ | d j o t i | S| i i o t
| | i ƒ n | g } | i d ƒ } d } d } } } xs| D]k} | d j o
| } n d | | f } zà t
ƒ t i d | | | ƒ t | | ƒ \ } }
} t i i | ƒ } | d j os t i d | | ƒ | i | |
ƒ p | i i o t | d d ƒ o
| } qªt i | =t | | |
| ƒ } n t | | |
| ƒ } Wd | o | i ƒ n t ƒ X| o t | | | ƒ n t | d ƒ o
| i } n | } qž W| S(
sˆ Import a module *only* from path, ignoring sys.path and
reloading if the version in sys.modules is not the one we want.
s Import %s from %st __main__R t s %s.%ss find module part %s (%s) in %ss sys.modules has %s as %st __path__N( R R R R t logt debugt syst modulesR t addPathst add_pathR R
R R t gett
sameModulet firstPackageWinst getattrR t closeR t setattrt hasattrR! (
R t dirR R t partst part_fqnamet modt parentt fht partt filenamet desct old( ( s> /opt/alt/python27/lib/python2.7/site-packages/nose/importer.pyR 1 sN
c C s, t i i | ƒ o | St i i | ƒ Sd S( N( R R t isdirt dirname( R R6 ( ( s> /opt/alt/python27/lib/python2.7/site-packages/nose/importer.pyt _dirname_if_filej s c C sÁ g } t | d ƒ o. x\ | i D] } | i | i | ƒ ƒ q Wn2 t | d ƒ o | i | i | i ƒ ƒ n t S| i | ƒ } x6 | D]. } t i d | | ƒ t | | ƒ o t Sq‹ Wt S( NR! t __file__s&