ó
J9•Qc           @   s<   d  Z  d d l Z d d l m Z d e f d „  ƒ  YZ d S(   sG  Use the AllModules plugin by passing ``--all-modules`` or setting the
NOSE_ALL_MODULES environment variable to enable collection and execution of
tests in all python modules. Normal nose behavior is to look for tests only in
modules that match testMatch.

More information: :doc:`../doc_tests/test_allmodules/test_allmodules`

.. warning ::

   This plugin can have surprising interactions with plugins that load tests
   from what nose normally considers non-test modules, such as
   the :doc:`doctest plugin <doctests>`. This is because any given
   object in a module can't be loaded both by a plugin and the normal nose
   :class:`test loader <nose.loader.TestLoader>`. Also, if you have functions
   or classes in non-test modules that look like tests but aren't, you will
   likely see errors as nose attempts to run them as tests.

iÿÿÿÿN(   t   Plugint
   AllModulesc           B   s)   e  Z d  Z d „  Z d „  Z d „  Z RS(   s+   Collect tests from all python modules.
    c         C   sT   d } | j  d d d d |  j d | j | ƒ d d |  j j |  j ƒ  | f ƒd	 S(
   s&   Register commandline options.
        t   NOSE_ALL_MODULESs   --all-modulest   actiont
   store_truet   destt   defaultt   helps   Enable plugin %s: %s [%s]N(   t
   add_optiont	   enableOptt   gett	   __class__t   __name__R   (   t   selft   parsert   envt   env_opt(    (    s;   /sys/lib/python2.7/site-packages/nose/plugins/allmodules.pyt   options   s    	c         C   s   | j  d ƒ r t Sd S(   s5   Override to return True for all files ending with .pys   .pyN(   t   endswitht   True(   R   t   file(    (    s;   /sys/lib/python2.7/site-packages/nose/plugins/allmodules.pyt   wantFile%   s    c         C   s   t  S(   s$   Override return True for all modules(   R   (   R   t   module(    (    s;   /sys/lib/python2.7/site-packages/nose/plugins/allmodules.pyt
   wantModule+   s    (   R   t
   __module__t   __doc__R   R   R   (    (    (    s;   /sys/lib/python2.7/site-packages/nose/plugins/allmodules.pyR      s   		(   R   t   ost   nose.plugins.baseR    R   (    (    (    s;   /sys/lib/python2.7/site-packages/nose/plugins/allmodules.pyt   <module>   s   