当前位置: 首页>>代码示例>>Python>>正文


Python Plugin.options方法代码示例

本文整理汇总了Python中nose.plugins.Plugin.options方法的典型用法代码示例。如果您正苦于以下问题:Python Plugin.options方法的具体用法?Python Plugin.options怎么用?Python Plugin.options使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在nose.plugins.Plugin的用法示例。


在下文中一共展示了Plugin.options方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。

示例1: options

# 需要导入模块: from nose.plugins import Plugin [as 别名]
# 或者: from nose.plugins.Plugin import options [as 别名]
 def options(self, parser, env):
     Plugin.options(self, parser, env)
     parser.add_option('--id-file', action='store', dest='testIdFile',
                       default='.noseids',
                       help="Store test ids found in test runs in this "
                       "file. Default is the file .noseids in the "
                       "working directory.")
开发者ID:scbarber,项目名称:horriblepoems,代码行数:9,代码来源:testid.py

示例2: options

# 需要导入模块: from nose.plugins import Plugin [as 别名]
# 或者: from nose.plugins.Plugin import options [as 别名]
 def options(self, parser, env=os.environ):
     Plugin.options(self, parser, env)
     
     parser.add_option(
         "", "--persist-test-database", action="store_true",
         default=env.get(self.env_opt), dest="persist_test_database",
         help="Do not flush database unless neccessary [%s]" % self.env_opt)
开发者ID:akaihola,项目名称:django-sane-testing,代码行数:9,代码来源:noseplugins.py

示例3: options

# 需要导入模块: from nose.plugins import Plugin [as 别名]
# 或者: from nose.plugins.Plugin import options [as 别名]
 def options(self, parser, env=os.environ):
     '''Add launch options for NoseXUnitLite'''
     # Call super
     Plugin.options(self, parser, env)
     # ---------------------------------------------------------------------
     # CORE
     # ---------------------------------------------------------------------
     # Add test target folder
     parser.add_option('--core-target',
                       action='store',
                       default = nconst.TARGET_CORE,
                       dest='core_target',
                       help='Output folder for test reports (default is %s).' % nconst.TARGET_CORE)
     # Add source folder
     parser.add_option('--source-folder',
                       action='store',
                       default=None,
                       dest='source',
                       help='Set source folder (optional). Add folder in sys.path.')
     # Search sources in source tree
     parser.add_option('--search-source',
                       action='store_true',
                       default=False,
                       dest='search_source',
                       help="Walk in the source folder to add deeper folders in sys.path if they don't contain __init__.py file. Works only if --source-folder is defined.")
     # Search tests in 
     parser.add_option('--search-test',
                       action='store_true',
                       default=False,
                       dest='search_test',
                       help='Search tests in folders with no __init__.py file (default: do nothing).')
开发者ID:kassoulet,项目名称:NoseXUnitLite,代码行数:33,代码来源:plugin.py

示例4: options

# 需要导入模块: from nose.plugins import Plugin [as 别名]
# 或者: from nose.plugins.Plugin import options [as 别名]
 def options(self, parser, env):
     Plugin.options(self, parser, env)
     parser.add_option("--re-pattern",
                       dest="pattern", action="store",
                       default=env.get("NOSE_REGEX_PATTERN", "test.*"),
                       help=("Run test methods that have a method name \
                       matching this regular expression"))    
开发者ID:justttry,项目名称:python_testing_cookbook,代码行数:9,代码来源:recipe13_plugin.py

示例5: options

# 需要导入模块: from nose.plugins import Plugin [as 别名]
# 或者: from nose.plugins.Plugin import options [as 别名]
 def options(self, parser, env=os.environ):
     # print "Options for nose plugin:", self.name # dbg
     Plugin.options(self, parser, env)
     parser.add_option(
         "--ipdoctest-tests",
         action="store_true",
         dest="ipdoctest_tests",
         default=env.get("NOSE_IPDOCTEST_TESTS", True),
         help="Also look for doctests in test modules. "
         "Note that classes, methods and functions should "
         "have either doctests or non-doctest tests, "
         "not both. [NOSE_IPDOCTEST_TESTS]",
     )
     parser.add_option(
         "--ipdoctest-extension",
         action="append",
         dest="ipdoctest_extension",
         help="Also look for doctests in files with " "this extension [NOSE_IPDOCTEST_EXTENSION]",
     )
     # Set the default as a list, if given in env; otherwise
     # an additional value set on the command line will cause
     # an error.
     env_setting = env.get("NOSE_IPDOCTEST_EXTENSION")
     if env_setting is not None:
         parser.set_defaults(ipdoctest_extension=tolist(env_setting))
开发者ID:kmike,项目名称:ipython,代码行数:27,代码来源:ipdoctest.py

示例6: options

# 需要导入模块: from nose.plugins import Plugin [as 别名]
# 或者: from nose.plugins.Plugin import options [as 别名]
 def options(self, parser, env):
     Plugin.options(self, parser, env)
     parser.add_option('--mutations-path', action='store',
                       default='.',
                       dest='mutations_path',
                       help='Restrict mutations to source files in this path'
                            ' (default: current working directory)')
     parser.add_option('--mutations-exclude', action='store',
                       metavar='REGEX', default=None,
                       dest='mutations_exclude',
                       help='Exclude mutations for source files containing '
                             'this pattern (default: None)')
     parser.add_option('--mutations-exclude-lines', action='store',
                       metavar='REGEX',
                       default=self.exclude_lines_pattern,
                       dest='mutations_exclude_lines',
                       help='Exclude mutations for lines containing this '
                            'pattern (default: \'%s\'' %
                             self.exclude_lines_pattern)
     parser.add_option('--mutations-mutators-modules', action='store',
                       default='elcap.mutator',
                       dest='mutators_modules',
                       help='Comma separated list of modules where the '
                            'Mutators are defined.')
     parser.add_option('--mutations-mutators', action='store',
                       default='',
                       dest='mutators',
                       help='Comma separated list of mutators to use. '
                            'Example: BooleanMutator,NumberMutator. An '
                            'empty list implies all Mutators in the defined '
                            'modules will be used.')
开发者ID:FedericoCeratto,项目名称:elcap,代码行数:33,代码来源:plugins.py

示例7: options

# 需要导入模块: from nose.plugins import Plugin [as 别名]
# 或者: from nose.plugins.Plugin import options [as 别名]
 def options(self, parser, env):
     Plugin.options(self, parser, env)
     parser.add_option(
         '--artifact-dir', action='store',
         dest='artifact_dir', metavar="DIR",
         help=("Root artifact directory for testrun. [Default " \
               "is new sub-dir under /tmp]"))
开发者ID:teolisitza,项目名称:nose-artifacts,代码行数:9,代码来源:plugin.py

示例8: options

# 需要导入模块: from nose.plugins import Plugin [as 别名]
# 或者: from nose.plugins.Plugin import options [as 别名]
 def options(self, parser, env):
     """Register commmandline options.
     """
     Plugin.options(self, parser, env)
     parser.add_option(
         "--html-output",
         default=env.get('NOSE_OUTPUT_FILE'),
         dest="outputFile", help="Dest. of output file")
开发者ID:creotiv,项目名称:django-nosetests,代码行数:10,代码来源:htmlplug.py

示例9: options

# 需要导入模块: from nose.plugins import Plugin [as 别名]
# 或者: from nose.plugins.Plugin import options [as 别名]
 def options(self, parser, env=os.environ):
     Plugin.options(self, parser, env)
     parser.add_option(
         "--with-dependency",
         action="store_true",
         dest="dependency",
         help="Order tests according to @requires decorators",
     )
开发者ID:noisecapella,项目名称:dependency_tests,代码行数:10,代码来源:plugin.py

示例10: options

# 需要导入模块: from nose.plugins import Plugin [as 别名]
# 或者: from nose.plugins.Plugin import options [as 别名]
 def options(self, parser, env):
     """Register commandline options.
     """
     Plugin.options(self, parser, env)
     parser.add_option('--randomize', action='store_true', dest='randomize',
                       help="Randomize the order of the tests within a unittest.TestCase class")
     parser.add_option('--seed', action='store', dest='seed', default=None, type = long,
                       help="Initialize the seed for deterministic behavior in reproducing failed tests")
开发者ID:my8bird,项目名称:nose-randomize,代码行数:10,代码来源:randomize.py

示例11: options

# 需要导入模块: from nose.plugins import Plugin [as 别名]
# 或者: from nose.plugins.Plugin import options [as 别名]
    def options(self, parser, env=None):
        Plugin.options(self, parser, env)
        parser.add_option('--rapido-blue', action='store_true',
                          dest='rapido_blue',
                          default=False,
                          help=
                          "Use the color blue instead of \
green for successfull tests")
开发者ID:erikzaadi,项目名称:nose-rapido,代码行数:10,代码来源:plugin.py

示例12: options

# 需要导入模块: from nose.plugins import Plugin [as 别名]
# 或者: from nose.plugins.Plugin import options [as 别名]
 def options(self, parser, env):
     Plugin.options(self, parser, env)
     parser.add_option(
         '--json-file', action='store',
         dest='json_file', metavar="FILE",
         default=env.get('NOSE_JSON_FILE', 'nosetests.json'),
         help=("Path to json file to store the report in. "
               "Default is nosetests.json in the working directory "
               "[NOSE_JSON_FILE]"))
开发者ID:ZachHall18,项目名称:Final_Project_Sam,代码行数:11,代码来源:plugin.py

示例13: options

# 需要导入模块: from nose.plugins import Plugin [as 别名]
# 或者: from nose.plugins.Plugin import options [as 别名]
 def options(self, parser, env):
     """Sets additional command line options."""
     Plugin.options(self, parser, env)
     parser.add_option('--dataproviders-first', action="store_true",
                       default=env.get('DATAPROVIDERS_FIRST', False),
                       dest="dataproviders_first",
                       help="If set, will call dataproviders, "
                            "when before finding tests."
                            "[DATAPROVIDERS_FIRST]")
开发者ID:z00sts,项目名称:lode_runner,代码行数:11,代码来源:dataprovider.py

示例14: options

# 需要导入模块: from nose.plugins import Plugin [as 别名]
# 或者: from nose.plugins.Plugin import options [as 别名]
 def options(self, parser, env=os.environ):
     """Sets additional command line options."""
     Plugin.options(self, parser, env)
     parser.add_option(
         '--lode-report', action='store',
         dest='lode_report', metavar="FILE",
         default=env.get('LODE_REPORT_FILE', 'lode-report.json'),
         help=("Path to xml file to store the lode report in. "
               "Default is lode-report.xml in the working directory "
               "[LODE_REPORT_FILE]"))
开发者ID:sh0ked,项目名称:lode_runner,代码行数:12,代码来源:json_reporter.py

示例15: options

# 需要导入模块: from nose.plugins import Plugin [as 别名]
# 或者: from nose.plugins.Plugin import options [as 别名]
 def options(self, parser, env):
     """Sets additional command line options."""
     Plugin.options(self, parser, env)
     parser.add_option(
         '--html-file', action='store',
         dest='html_file', metavar="FILE",
         default=env.get('NOSE_HTML_FILE', 'nosetests.html'),
         help="Path to html file to store the report in. "
              "Default is nosetests.html in the working directory "
              "[NOSE_HTML_FILE]")
开发者ID:drmalex07,项目名称:nose-htmloutput,代码行数:12,代码来源:__init__.py


注:本文中的nose.plugins.Plugin.options方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。