Module Import alias Import alias Import alias ImportFrom alias ImportFrom alias alias alias alias alias Assign NameStore Call AttributeLoad NameLoad attr NameLoad Assign NameStore NameLoad ClassDef bases AttributeLoad NameLoad attr body Expr Str Assign NameStore AttributeLoad NameLoad attr Assign NameStore NameLoad Assign NameStore AttributeLoad NameLoad attr Assign NameStore AttributeLoad NameLoad attr Assign NameStore TupleLoad Str Str Str Str Str Str Str Str Str Str Str Str Str Str Assign NameStore TupleLoad FunctionDef arguments args NameParam defaults kwarg body Assign NameStore Call AttributeLoad NameLoad attr Str ListLoad Assign NameStore Call AttributeLoad NameLoad attr Str ListLoad Assign NameStore Call AttributeLoad NameLoad attr Str ListLoad Assign AttributeStore NameLoad attr Call NameLoad AttributeLoad NameLoad attr Assign AttributeStore NameLoad attr Call NameLoad AttributeLoad NameLoad attr Assign AttributeStore NameLoad attr NameLoad Expr Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad Expr Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad Expr Call AttributeLoad Call NameLoad NameLoad NameLoad attr NameLoad decorator_list FunctionDef arguments args NameParam NameParam defaults body Expr Str Assign AttributeStore NameLoad attr Call AttributeLoad NameLoad attr Assign AttributeStore AttributeLoad NameLoad attr attr AttributeLoad NameLoad attr Assign AttributeStore NameLoad attr AttributeLoad AttributeLoad NameLoad attr attr Assign AttributeStore NameLoad attr Call AttributeLoad NameLoad attr AttributeLoad NameLoad attr Assign AttributeStore AttributeLoad NameLoad attr attr AttributeLoad NameLoad attr Expr Call AttributeLoad NameLoad attr Assign TupleStore NameStore NameStore Call AttributeLoad AttributeLoad NameLoad attr attr SubscriptLoad NameLoad Slice Num Expr Call AttributeLoad NameLoad attr NameLoad Expr Call AttributeLoad AttributeLoad NameLoad attr attr Str keyword Str Expr Call AttributeLoad AttributeLoad NameLoad attr attr Str Str keyword Str keyword Str Assign TupleStore NameStore NameStore Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad If NameLoad body Expr Call AttributeLoad AttributeLoad NameLoad attr attr BinOpMod Str Call AttributeLoad Str attr NameLoad Expr Call AttributeLoad NameLoad attr NameLoad Expr Call AttributeLoad NameLoad attr decorator_list FunctionDef arguments args NameParam defaults body Expr Str Expr Call AttributeLoad AttributeLoad NameLoad attr attr Str Str keyword NameLoad keyword Str Expr Call AttributeLoad AttributeLoad NameLoad attr attr Str Str Str keyword Str Expr Call AttributeLoad AttributeLoad NameLoad attr attr Str Str keyword Str keyword Str keyword ListLoad Str Str keyword Str Expr Call AttributeLoad AttributeLoad NameLoad attr attr Str keyword Str keyword Str keyword NameLoad keyword NameLoad keyword Str Expr Call AttributeLoad AttributeLoad NameLoad attr attr Str keyword Str keyword Str keyword NameLoad keyword NameLoad keyword Str Expr Call AttributeLoad AttributeLoad NameLoad attr attr Str keyword Str keyword Str keyword ListLoad keyword Str Expr Call AttributeLoad AttributeLoad NameLoad attr attr Str keyword Str keyword Str keyword ListLoad keyword Str Expr Call AttributeLoad AttributeLoad NameLoad attr attr Str Str keyword Str keyword Num keyword Str Expr Call AttributeLoad AttributeLoad NameLoad attr attr Str keyword Str keyword Str keyword Num Expr Call AttributeLoad AttributeLoad NameLoad attr attr Str keyword AttributeLoad NameLoad attr keyword Str decorator_list FunctionDef arguments args NameParam NameParam defaults body Expr Str Assign AttributeStore AttributeLoad NameLoad attr attr Call AttributeLoad NameLoad attr AttributeLoad NameLoad attr Expr Call AttributeLoad NameLoad attr keyword AttributeLoad AttributeLoad NameLoad attr attr Expr Call AttributeLoad NameLoad attr Str AttributeLoad NameLoad attr If AttributeLoad NameLoad attr body AugAssignAdd AttributeStore AttributeLoad NameLoad attr attr AttributeLoad NameLoad attr Assign AttributeStore AttributeLoad NameLoad attr attr AttributeLoad NameLoad attr If AttributeLoad NameLoad attr body Assign AttributeStore AttributeLoad NameLoad attr attr AttributeLoad NameLoad attr Expr Call AttributeLoad AttributeLoad NameLoad attr attr Call AttributeLoad NameLoad attr NameLoad Expr Call AttributeLoad AttributeLoad NameLoad attr attr Expr Call AttributeLoad AttributeLoad NameLoad attr attr If AttributeLoad NameLoad attr body Expr Call AttributeLoad AttributeLoad NameLoad attr attr AttributeLoad NameLoad attr Expr Call AttributeLoad AttributeLoad NameLoad attr attr AttributeLoad NameLoad attr Expr Call AttributeLoad NameLoad attr orelse If BoolOpOr AttributeLoad NameLoad attr AttributeLoad NameLoad attr body Expr Call AttributeLoad NameLoad attr Str decorator_list FunctionDef arguments args NameParam NameParam defaults body Expr Str Assign NameStore SubscriptLoad AttributeLoad NameLoad attr Slice Assign NameStore TupleLoad Str Str For NameStore NameLoad body If AttributeLoad NameLoad attr body Assign NameStore Call AttributeLoad AttributeLoad NameLoad attr attr Call AttributeLoad AttributeLoad NameLoad attr attr AttributeLoad NameLoad attr NameLoad Expr Call AttributeLoad NameLoad attr NameLoad If AttributeLoad NameLoad attr body Assign NameStore TupleLoad Str Str For NameStore NameLoad body Expr Call AttributeLoad NameLoad attr Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad Return NameLoad decorator_list FunctionDef arguments args NameParam NameParam defaults body Expr Str Assign AttributeStore NameLoad attr AttributeLoad NameLoad attr Expr Call AttributeLoad AttributeLoad AttributeLoad NameLoad attr attr attr Call AttributeLoad NameLoad attr keyword NameLoad decorator_list FunctionDef arguments args NameParam defaults body Expr Str Expr Call AttributeLoad AttributeLoad NameLoad attr attr AttributeLoad NameLoad attr AttributeLoad NameLoad attr For TupleStore NameStore NameStore AttributeLoad NameLoad attr body Expr Call AttributeLoad AttributeLoad AttributeLoad NameLoad attr attr attr NameLoad NameLoad decorator_list FunctionDef arguments args NameParam defaults body Expr Str Assign NameStore Call AttributeLoad NameLoad attr AttributeLoad NameLoad attr AttributeLoad NameLoad attr AttributeLoad NameLoad attr Assign NameStore Call AttributeLoad AttributeLoad AttributeLoad NameLoad attr attr attr NameLoad If AttributeLoad NameLoad attr body Assign NameStore NameLoad orelse Expr Call AttributeLoad NameLoad attr Str AttributeLoad NameLoad attr AttributeLoad NameLoad attr Assign NameStore Call AttributeLoad AttributeLoad NameLoad attr attr AttributeLoad NameLoad attr AttributeLoad NameLoad attr Assign NameStore Call AttributeLoad NameLoad attr NameLoad Assign NameStore Call AttributeLoad AttributeLoad AttributeLoad NameLoad attr attr attr NameLoad If AttributeLoad NameLoad attr body Assign NameStore NameLoad Assign AttributeStore NameLoad attr NameLoad decorator_list FunctionDef arguments args NameParam defaults body Expr Str Assign NameStore Call AttributeLoad NameLoad attr TryExcept body Assign AttributeStore NameLoad attr Call AttributeLoad NameLoad attr AttributeLoad NameLoad attr handlers ExceptHandler type NameLoad name NameStore body Expr Call AttributeLoad NameLoad attr Str Expr Call AttributeLoad AttributeLoad NameLoad attr attr BinOpMod Str NameLoad If AttributeLoad NameLoad attr body Expr Call AttributeLoad NameLoad attr Num If AttributeLoad NameLoad attr body Expr Call AttributeLoad NameLoad attr UnaryOpNot Call AttributeLoad AttributeLoad NameLoad attr attr decorator_list FunctionDef arguments args NameParam defaults body Assign NameStore Call AttributeLoad NameLoad attr AttributeLoad NameLoad attr Assign NameStore Call AttributeLoad NameLoad attr NameLoad Expr Call AttributeLoad AttributeLoad AttributeLoad NameLoad attr attr attr NameLoad Assign AttributeStore AttributeLoad NameLoad attr attr AttributeLoad NameLoad attr Return AttributeLoad NameLoad attr decorator_list FunctionDef arguments args NameParam defaults body Expr Str Return AttributeLoad NameLoad attr decorator_list NameLoad decorator_list Assign NameStore NameLoad FunctionDef arguments args defaults vararg kwarg body Expr Str Assign SubscriptStore NameLoad Index Str NameLoad Return Call NameLoad NameLoad NameLoad decorator_list
N/A N/A logging N/A os N/A sys nose2.compat unittest nose2 events loader runner session util N/A log N/A N/A logging getLogger __name__ N/A __unittest True PluggableTestProgram N/A N/A unittest TestProgram N/A N/A TestProgram that enables plugins.

    Accepts the same parameters as :class:`unittest.TestProgram`,
    but most of them are ignored as their functions are
    handled by plugins.

    :param module: Module in which to run tests. Default: :func:`__main__`
    :param defaultTest: Default test name. Default: ``None``
    :param argv: Command line args. Default: ``sys.argv``
    :param testRunner: *IGNORED*
    :param testLoader: *IGNORED*
    :param exit: Exit after running tests?
    :param verbosity: Base verbosity
    :param failfast: *IGNORED*
    :param catchbreak: *IGNORED*
    :param buffer: *IGNORED*
    :param plugins: List of additional plugin modules to load
    :param excludePlugins: List of plugin modules to exclude
    :param extraHooks: List of hook names and plugin *instances* to
                       register with the session's hooks system. Each
                       item in the list must be a 2-tuple of
                       (hook name, plugin instance)

    .. attribute :: sessionClass

       The class to instantiate to create a test run configuration
       session. Default: :class:`nose2.session.Session`

    .. attribute :: loaderClass

       The class to instantiate to create a test loader. Default:
       :class:`nose2.loader.PluggableTestLoader`.

       .. warning ::

          Overriding this attribute is the only way to customize
          the test loader class. Passing a test loader to
          :func:`__init__` does not work.

    .. attribute :: runnerClass

       The class to instantiate to create a test runner.  Default:
       :class:`nose2.runner.PluggableTestRunner`.

       .. warning ::

          Overriding this attribute is the only way to customize
          the test runner class. Passing a test runner to
          :func:`__init__` does not work.

    .. attribute :: defaultPlugins

       List of default plugin modules to load.

     N/A sessionClass N/A session Session N/A _currentSession None N/A loaderClass N/A loader PluggableTestLoader N/A runnerClass N/A runner PluggableTestRunner N/A defaultPlugins N/A nose2.plugins.loader.discovery nose2.plugins.loader.testcases nose2.plugins.loader.functions nose2.plugins.loader.testclasses nose2.plugins.loader.generators nose2.plugins.loader.parameters nose2.plugins.loader.loadtests nose2.plugins.dundertest nose2.plugins.coverage nose2.plugins.result nose2.plugins.logcapture nose2.plugins.buffer nose2.plugins.failfast nose2.plugins.debugger N/A excludePlugins N/A __init__ N/A N/A self N/A kw N/A N/A plugins N/A N/A kw pop plugins N/A N/A exclude N/A N/A kw pop excludePlugins N/A N/A hooks N/A N/A kw pop extraHooks N/A N/A N/A self defaultPlugins N/A list N/A self defaultPlugins N/A N/A self excludePlugins N/A list N/A self excludePlugins N/A N/A self extraHooks hooks N/A N/A N/A N/A self defaultPlugins extend plugins N/A N/A N/A N/A self excludePlugins extend exclude N/A N/A N/A N/A super PluggableTestProgram self __init__ kw N/A parseArgs N/A N/A self argv N/A N/A N/A Parse command line args

        Parses arguments and creates a configuration session,
        then calls :func:`createTests`.

         N/A N/A self session N/A N/A self sessionClass N/A N/A N/A self __class__ _currentSession N/A self session N/A N/A self argparse N/A N/A self session argparse N/A N/A self testLoader N/A N/A self loaderClass N/A self session N/A N/A N/A self session testLoader N/A self testLoader N/A N/A N/A self setInitialArguments N/A N/A cfg_args argv N/A N/A N/A self argparse parse_known_args N/A argv N/A 1 N/A N/A N/A self handleCfgArgs cfg_args N/A N/A N/A N/A self argparse add_argument testNames nargs * N/A N/A N/A N/A self argparse add_argument -h --help action help help Show this help message and exit N/A N/A args argv N/A N/A N/A self argparse parse_known_args argv N/A argv N/A N/A N/A N/A N/A self argparse error N/A Unrecognized arguments: %s N/A N/A join argv N/A N/A N/A self handleArgs args N/A N/A N/A self createTests N/A setInitialArguments N/A N/A self N/A N/A N/A Set pre-plugin command-line arguments.

        This set of arguments is parsed out of the command line
        before plugins are loaded.

         N/A N/A N/A N/A self argparse add_argument -s --start-dir default None help Directory to start discovery ('.' default) N/A N/A N/A N/A self argparse add_argument -t --top-level-directory --project-directory help Top level directory of project (defaults to start dir) N/A N/A N/A N/A self argparse add_argument --config -c nargs ? action append default N/A unittest.cfg nose2.cfg help Config files to load, if they exist. ('unittest.cfg' and 'nose2.cfg' in start directory default) N/A N/A N/A N/A self argparse add_argument --no-user-config action store_const dest user_config const False default True help Do not load user config files N/A N/A N/A N/A self argparse add_argument --no-plugins action store_const dest load_plugins const False default True help Do not load any plugins. Warning: nose2 does not do anything if no plugins are loaded N/A N/A N/A N/A self argparse add_argument --plugin action append dest plugins default N/A help Load this plugin module. N/A N/A N/A N/A self argparse add_argument --exclude-plugin action append dest exclude_plugins default N/A help Do not load this plugin module N/A N/A N/A N/A self argparse add_argument --verbose -v action count default 0 help print test case names and statuses N/A N/A N/A N/A self argparse add_argument --quiet action store_const dest verbose const 0 N/A N/A N/A N/A self argparse add_argument --log-level default N/A logging WARN help Set logging level for message logged to console. N/A handleCfgArgs N/A N/A self cfg_args N/A N/A N/A Handle initial arguments.

        Handle the initial, pre-plugin arguments parsed out of the
        command line.

         N/A N/A N/A self session logLevel N/A N/A util parse_log_level N/A cfg_args log_level N/A N/A N/A logging basicConfig level N/A N/A self session logLevel N/A N/A N/A log debug logging initialized %s N/A cfg_args log_level N/A N/A cfg_args verbose N/A N/A N/A N/A self session verbosity N/A cfg_args verbose N/A N/A N/A self session startDir N/A cfg_args start_dir N/A N/A cfg_args top_level_directory N/A N/A N/A N/A self session topLevelDir N/A cfg_args top_level_directory N/A N/A N/A N/A self session loadConfigFiles N/A N/A self findConfigFiles cfg_args N/A N/A N/A N/A self session setStartDir N/A N/A N/A N/A self session prepareSysPath N/A N/A cfg_args load_plugins N/A N/A N/A N/A N/A self defaultPlugins extend N/A cfg_args plugins N/A N/A N/A N/A self excludePlugins extend N/A cfg_args exclude_plugins N/A N/A N/A self loadPlugins N/A N/A N/A N/A cfg_args plugins N/A cfg_args exclude_plugins N/A N/A N/A N/A log warn Both '--no-plugins' and '--plugin' or '--exclude-plugin' specified. No plugins were loaded. N/A findConfigFiles N/A N/A self cfg_args N/A N/A N/A Find available config files N/A filenames N/A N/A cfg_args config N/A N/A proj_opts N/A unittest.cfg nose2.cfg N/A fn proj_opts N/A N/A N/A cfg_args top_level_directory N/A N/A fn N/A N/A N/A os path abspath N/A N/A N/A os path join N/A cfg_args top_level_directory fn N/A N/A N/A filenames append fn N/A N/A cfg_args user_config N/A N/A user_opts N/A ~/.unittest.cfg ~/.nose2.cfg N/A fn user_opts N/A N/A N/A N/A filenames append N/A N/A N/A os path expanduser fn N/A filenames N/A handleArgs N/A N/A self args N/A N/A N/A Handle further arguments.

        Handle arguments parsed out of command line after plugins have
        been loaded (and injected their argument configuration).

         N/A N/A self testNames N/A args testNames N/A N/A N/A N/A N/A self session hooks handleArgs N/A N/A events CommandLineArgsEvent args args N/A loadPlugins N/A N/A self N/A N/A N/A Load available plugins


        :func:`self.defaultPlugins`` and :func:`self.excludePlugins` are passed
        to the session to alter the list of plugins that will be
        loaded.

        This method also registers any (hook, plugin) pairs set in
        ``self.hooks``. This is a good way to inject plugins that fall
        outside of the normal loading procedure, for example, plugins
        that need some runtime information that can't easily be
        passed to them through the configuration system.

         N/A N/A N/A N/A self session loadPlugins N/A self defaultPlugins N/A self excludePlugins N/A N/A method_name plugin N/A self extraHooks N/A N/A N/A N/A N/A N/A self session hooks register method_name plugin N/A createTests N/A N/A self N/A N/A N/A Create top-level test suite N/A event N/A N/A events CreateTestsEvent N/A self testLoader N/A self testNames N/A self module N/A result N/A N/A N/A N/A self session hooks createTests event N/A N/A event handled N/A N/A test result N/A N/A N/A N/A log debug Create tests from %s/%s N/A self testNames N/A self module N/A test N/A N/A N/A self testLoader loadTestsFromNames N/A self testNames N/A self module N/A event N/A N/A events CreatedTestSuiteEvent test N/A result N/A N/A N/A N/A self session hooks createdTestSuite event N/A N/A event handled N/A N/A test result N/A N/A self test test N/A runTests N/A N/A self N/A N/A N/A Run tests N/A runner N/A N/A self _makeRunner N/A N/A N/A N/A self result N/A N/A runner run N/A self test N/A N/A N/A Exception N/A e N/A N/A N/A N/A log exception Internal Error N/A N/A N/A N/A sys stderr write N/A Internal Error: runTests aborted: %s
 e N/A N/A self exit N/A N/A N/A N/A sys exit 1 N/A N/A self exit N/A N/A N/A N/A sys exit N/A N/A N/A N/A self result wasSuccessful N/A _makeRunner N/A N/A self N/A N/A N/A runner N/A N/A self runnerClass N/A self session N/A event N/A N/A events RunnerCreatedEvent runner N/A N/A N/A N/A N/A self session hooks runnerCreated event N/A N/A N/A self session testRunner N/A event runner N/A N/A event runner N/A getCurrentSession N/A N/A cls N/A N/A N/A Returns the current session, or ``None`` if no :class:`nose2.session.Session` is running.

         N/A N/A cls _currentSession N/A classmethod N/A N/A main PluggableTestProgram discover N/A N/A N/A args kwargs N/A N/A Main entry point for test discovery.

    Running discover calls :class:`nose2.main.PluggableTestProgram`,
    passing through all arguments and keyword arguments **except module**:
    ``module`` is discarded, to force test discovery.

     N/A N/A kwargs N/A module None N/A N/A main args kwargs N/A