Ñò Æ^mGc @ 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 l Z e i e ƒ Z d d d g Z e i i Z e i i Z e i i Z e i i Z e i i Z e i i Z d e f d „ ƒ YZ e Z d e f d „ ƒ YZ d S( s» Test Selection -------------- Test selection is handled by a Selector. The test loader calls the appropriate selector method for each object it encounters that it thinks may be a test. iÿÿÿÿN( t Config( t split_test_namet srct getfilenamet getpackaget ispackaget Selectort defaultSelectort TestAddressc B s_ e Z d Z d „ Z d „ Z d „ Z d „ Z d „ Z d „ Z d „ Z d „ Z d „ Z RS( s¥ Core test selector. Examines test candidates and determines whether, given the specified configuration, the test candidate should be selected as a test. c C s+ | d j o t ƒ } n | i | ƒ d S( N( t NoneR t configure( t selft config( ( s1 /usr/lib/python2.6/site-packages/nose/selector.pyt __init__" s c C sI | | _ | i | _ | i | _ | i | _ | i | _ | i | _ d S( N( R t excludet ignoreFilest includet pluginst testMatcht match( R R ( ( s1 /usr/lib/python2.6/site-packages/nose/selector.pyR ' s c C s” | i i | ƒ pA | i ow t d g } | i D] } | | i | ƒ q1 ~ ƒ o@ | i p5 t d g } | i D] } | | i | ƒ qs ~ ƒ S( s¢ Does the name match my requirements? To match, a name must match config.testMatch OR config.include and it must not match config.exclude N( R t searchR t filterR R ( R t namet _[1]t inct _[2]t exc( ( s1 /usr/lib/python2.6/site-packages/nose/selector.pyt matches/ s 1c C sµ t | d d ƒ } | d j o | } n: | i i d ƒ o# t | t i ƒ p | i | i ƒ } | i i | ƒ } | d j o t i d | | ƒ | } n t i d | | ƒ | S( s¹ Is the class a wanted test class? A class must be a unittest.TestCase subclass, or match test name requirements. Classes that start with _ are always excluded. t __test__t _s$ Plugin setting selection of %s to %ss wantClass %s? %sN( t getattrR t __name__t startswitht issubclasst unittestt TestCaseR R t wantClasst logt debug( R t clst declaredt wantedt plug_wants( ( s1 /usr/lib/python2.6/site-packages/nose/selector.pyR$ > s c C sá t | ƒ } t | ƒ oF | i p5 t d g } | i D] } | | i | ƒ q8 ~ ƒ } n0 | i | ƒ p | i i o | | i i j } | i i | ƒ } | d j o t i d | | ƒ | } n t i d | | ƒ | S( s½ Is the directory a wanted test directory? All package directories match, so long as they do not match exclude. All other directories must match test requirements. s$ Plugin setting selection of %s to %ss wantDirectory %s? %sN( t op_basenameR R R R R R R t srcDirsR t wantDirectoryR% R&