本文整理汇总了Python中nose.plugins.base.Plugin.options方法的典型用法代码示例。如果您正苦于以下问题:Python Plugin.options方法的具体用法?Python Plugin.options怎么用?Python Plugin.options使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类nose.plugins.base.Plugin
的用法示例。
在下文中一共展示了Plugin.options方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: options
# 需要导入模块: from nose.plugins.base import Plugin [as 别名]
# 或者: from nose.plugins.base.Plugin import options [as 别名]
def options(self, parser, env):
"""Sets additional command line options."""
Plugin.options(self, parser, env)
parser.add_option(
'--tddium-output-file', action='store',
dest='tddium_output_file', metavar="FILE",
default=env.get('TDDIUM_OUTPUT_FILE', 'tddium_output.json'))
示例2: options
# 需要导入模块: from nose.plugins.base import Plugin [as 别名]
# 或者: from nose.plugins.base.Plugin import options [as 别名]
def options(self, parser, env):
"""
Register command line options
"""
parser.add_option("--marvin-config", action="store",
default=env.get('MARVIN_CONFIG',
'./datacenter.cfg'),
dest="configFile",
help="Marvin's configuration file is required."
"The config file containing the datacenter and "
"other management server "
"information is specified")
parser.add_option("--deploy", action="store_true",
default=False,
dest="deployDc",
help="Deploys the DC with Given Configuration."
"Requires only when DC needs to be deployed")
parser.add_option("--zone", action="store",
default=None,
dest="zone",
help="Runs all tests against this specified zone")
parser.add_option("--hypervisor", action="store",
default=None,
dest="hypervisor_type",
help="Runs all tests against the specified "
"zone and hypervisor Type")
parser.add_option("--log-folder-path", action="store",
default=None,
dest="logFolder",
help="Collects all logs under the user specified"
"folder"
)
Plugin.options(self, parser, env)
示例3: options
# 需要导入模块: from nose.plugins.base import Plugin [as 别名]
# 或者: from nose.plugins.base.Plugin import options [as 别名]
def options(self, parser, env):
"""
Add options to command line.
"""
Plugin.options(self, parser, env)
parser.add_option("--cover3-package", action="append",
default=env.get('NOSE_COVER_PACKAGE'),
metavar="PACKAGE",
dest="cover_packages",
help="Restrict coverage output to selected packages "
"[NOSE_COVER_PACKAGE]")
parser.add_option("--cover3-erase", action="store_true",
default=env.get('NOSE_COVER_ERASE'),
dest="cover_erase",
help="Erase previously collected coverage "
"statistics before run")
parser.add_option("--cover3-tests", action="store_true",
dest="cover_tests",
default=env.get('NOSE_COVER_TESTS'),
help="Include test modules in coverage report "
"[NOSE_COVER_TESTS]")
parser.add_option("--cover3-branch", action="store_true",
dest="cover_branch",
default=env.get('NOSE_COVER_BRANCH'),
help="Include branch coverage. "
"[NOSE_COVER_BRANCH]")
parser.add_option("--cover3-exclude", action="store",
dest="cover_exclude",
default=env.get('NOSE_COVER_EXCLUDE'),
type="string",
help="List of modules to exclude from coverage. "
"Supports wildcard matching at both start and "
"end. Example: *.core.dispatch.* "
"[NOSE_COVER_EXCLUDE]")
parser.add_option("--cover3-inclusive", action="store_true",
dest="cover_inclusive",
default=env.get('NOSE_COVER_INCLUSIVE'),
help="Include all python files under working "
"directory in coverage report. Useful for "
"discovering holes in test coverage if not all "
"files are imported by the test suite. "
"[NOSE_COVER_INCLUSIVE]")
parser.add_option("--cover3-html", action="store_true",
default=env.get('NOSE_COVER_HTML'),
dest='cover_html',
help="Produce HTML coverage information")
parser.add_option('--cover3-html-dir', action='store',
default=env.get('NOSE_COVER_HTML_DIR', 'cover'),
dest='cover_html_dir',
metavar='DIR',
help='Produce HTML coverage information in dir')
parser.add_option('--cover3-xml', action='store_true',
default=env.get('NOSE_COVER_XML'),
dest='cover_xml',
help='Add Cobertura-style XML coverage reports')
parser.add_option('--cover3-xml-file', action='store',
default=env.get('NOSE_COVER_XML_FILE'),
dest='cover_xml_file',
help='File to write XML coverage report.')
示例4: options
# 需要导入模块: from nose.plugins.base import Plugin [as 别名]
# 或者: from nose.plugins.base.Plugin import options [as 别名]
def options(self, parser, env):
"""
Sets additional command line options.
"""
Plugin.options(self, parser, env)
parser.add_option(
'--gc-per-context', action = 'store_true', dest = 'gc_per_context',
default = env.get('NOSE_GC_PER_CONTEXT', self._gcPerCtxt),
help = ("Perform garbage collection after each context. "
"Default is %s [NOSE_GC_PER_CONTEXT]" % self._gcPerCtxt)
)
parser.add_option(
'--gc-per-directory', action = 'store_true', dest = 'gc_per_directory',
default = env.get('NOSE_GC_PER_DIRECTORY', self._gcPerDir),
help = ("Perform garbage collection after each directory. "
"Default %is s [NOSE_GC_PER_DIRECTORY]" % self._gcPerDir)
)
parser.add_option(
'--gc-per-test', action = 'store_true', dest = 'gc_per_test',
default = env.get('NOSE_GC_PER_TEST', self._gcPerTest),
help = ("Perform garbage collection after each test. This can be VERY slow! "
"Default is %s [NOSE_GC_PER_TEST]" % self._gcPerTest)
)
parser.add_option(
'--gc-gen', action = 'store', dest = 'gc_gen',
default = env.get('NOSE_GC_GEN', self._gen),
help = "Garbage collection generation to run. Default is %d [NOSE_GC_GEN]" % self._gen
)
示例5: options
# 需要导入模块: from nose.plugins.base import Plugin [as 别名]
# 或者: from nose.plugins.base.Plugin import options [as 别名]
def options(self, parser, env=os.environ):
Plugin.options(self, parser, env)
parser.add_option("--cover-package", action="append",
default=env.get('NOSE_COVER_PACKAGE'),
dest="cover_packages",
help="Restrict coverage output to selected packages "
"[NOSE_COVER_PACKAGE]")
parser.add_option("--cover-erase", action="store_true",
default=env.get('NOSE_COVER_ERASE'),
dest="cover_erase",
help="Erase previously collected coverage "
"statistics before run")
parser.add_option("--cover-tests", action="store_true",
dest="cover_tests",
default=env.get('NOSE_COVER_TESTS'),
help="Include test modules in coverage report "
"[NOSE_COVER_TESTS]")
parser.add_option("--cover-inclusive", action="store_true",
dest="cover_inclusive",
default=env.get('NOSE_COVER_INCLUSIVE'),
help="Include all python files under working "
"directory in coverage report. Useful for "
"discovering holes in test coverage if not all "
"files are imported by the test suite. "
"[NOSE_COVER_INCLUSIVE]")
示例6: options
# 需要导入模块: from nose.plugins.base import Plugin [as 别名]
# 或者: from nose.plugins.base.Plugin import options [as 别名]
def options(self, parser, env):
"""
Register command line options
"""
parser.add_option("--marvin-config", action="store",
default=env.get('MARVIN_CONFIG', './datacenter.cfg'),
dest="config",
help="Marvin's configuration file where the " +
"datacenter information is specified " +
"[MARVIN_CONFIG]")
parser.add_option("--result-log", action="store",
default=env.get('RESULT_LOG', None),
dest="result_log",
help="The path to the results file where test " +
"summary will be written to [RESULT_LOG]")
parser.add_option("--client-log", action="store",
default=env.get('DEBUG_LOG', 'debug.log'),
dest="debug_log",
help="The path to the testcase debug logs " +
"[DEBUG_LOG]")
parser.add_option("--load", action="store_true", default=False,
dest="load",
help="Only load the deployment configuration given")
Plugin.options(self, parser, env)
示例7: options
# 需要导入模块: from nose.plugins.base import Plugin [as 别名]
# 或者: from nose.plugins.base.Plugin import options [as 别名]
def options(self, parser, env=os.environ):
Plugin.options(self, parser, env)
# Test doctests in 'test' files / directories. Standard plugin default
# is False
self.doctest_tests = True
# Variable name; if defined, doctest results stored in this variable in
# the top-level namespace. None is the standard default
self.doctest_result_var = None
示例8: options
# 需要导入模块: from nose.plugins.base import Plugin [as 别名]
# 或者: from nose.plugins.base.Plugin import options [as 别名]
def options(self, parser, env):
"""Register commandline options."""
Plugin.options(self, parser, env)
parser.add_option(
"--ss-errors-only", action="store_true", dest="debugErrors",
default=False, help="Screenshot errors but not failures")
parser.add_option(
"--ss-failures-only", action="store_true", dest="debugFailures",
default=False, help="Screenshot failures but not errors")
示例9: options
# 需要导入模块: from nose.plugins.base import Plugin [as 别名]
# 或者: from nose.plugins.base.Plugin import options [as 别名]
def options(self, parser, env):
"""Sets additional command line options."""
Plugin.options(self, parser, env)
parser.add_option(
'--xunit-file', action='store',
dest='xunit_file', metavar="FILE",
default=env.get('NOSE_XUNIT_FILE', 'nosetests.xml'),
help=("Path to xml file to store the xunit report in. "
"Default is nosetests.xml in the working directory "
"[NOSE_XUNIT_FILE]"))
示例10: options
# 需要导入模块: from nose.plugins.base import Plugin [as 别名]
# 或者: from nose.plugins.base.Plugin import options [as 别名]
def options(self, parser, env):
"""
Register command line options
"""
parser.add_option("--myplugin-log", action="store",
default=env.get('DEBUG_LOG', 'debug.log'),
dest="debug_log",
help="The path to the testcase debug logs [DEBUG_LOG]")
Plugin.options(self, parser, env)
示例11: options
# 需要导入模块: from nose.plugins.base import Plugin [as 别名]
# 或者: from nose.plugins.base.Plugin import options [as 别名]
def options(self, parser, env):
Plugin.options(self, parser, env)
parser.add_option("--gettext-cover-pot-file", action="store",
default="po/keys.pot",
dest="cover_pot_file",
help="pot file containing gettext msgs")
parser.add_option("--gettext-cover-details", action="store_true",
default=False,
dest="cover_details",
help="show coverage stats for all strings")
示例12: options
# 需要导入模块: from nose.plugins.base import Plugin [as 别名]
# 或者: from nose.plugins.base.Plugin import options [as 别名]
def options(self, parser, env):
"""Register commmandline options.
"""
Plugin.options(self, parser, env)
parser.add_option(
"--doctest-tests",
action="store_true",
dest="doctest_tests",
default=env.get("NOSE_DOCTEST_TESTS"),
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_DOCTEST_TESTS]",
)
parser.add_option(
"--doctest-extension",
action="append",
dest="doctestExtension",
metavar="EXT",
help="Also look for doctests in files with " "this extension [NOSE_DOCTEST_EXTENSION]",
)
parser.add_option(
"--doctest-result-variable",
dest="doctest_result_var",
default=env.get("NOSE_DOCTEST_RESULT_VAR"),
metavar="VAR",
help="Change the variable name set to the result of "
"the last interpreter command from the default '_'. "
"Can be used to avoid conflicts with the _() "
"function used for text translation. "
"[NOSE_DOCTEST_RESULT_VAR]",
)
parser.add_option(
"--doctest-fixtures",
action="store",
dest="doctestFixtures",
metavar="SUFFIX",
help="Find fixtures for a doctest file in module "
"with this name appended to the base name "
"of the doctest file",
)
parser.add_option(
"--doctest-options",
action="append",
dest="doctestOptions",
metavar="OPTIONS",
help="Specify options to pass to doctest. " + "Eg. '+ELLIPSIS,+NORMALIZE_WHITESPACE'",
)
# 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_DOCTEST_EXTENSION")
if env_setting is not None:
parser.set_defaults(doctestExtension=tolist(env_setting))
示例13: options
# 需要导入模块: from nose.plugins.base import Plugin [as 别名]
# 或者: from nose.plugins.base.Plugin import options [as 别名]
def options(self, parser, env):
"""Sets additional command line options."""
Plugin.options(self, parser, env)
parser.add_option('--xunit_file2',
action='store',
dest='xunit_file2',
metavar="FILE",
default=env.get('NOSE_XUNIT_FILE', 'nosetests.xml'),
help=("Path to xml file to store the xunit report in. "
"Default is nosetests.xml in the working directory "
"[NOSE_XUNIT_FILE]"))
parser.add_option('--testrail-ip',
action="store",
dest="testrailIp",
metavar="FILE",
default="",
help="Url of testrail server")
parser.add_option('--testrail-key',
action="store",
dest="testrailKey",
metavar="FILE",
default="",
help="Key authentication")
parser.add_option('--project-name',
action="store",
dest="projectName",
metavar="FILE",
default="Open vStorage Engineering",
help="Testrail project name")
parser.add_option('--push-name',
action="store",
dest="pushName",
metavar="FILE",
default="AT push results",
help="Testrail push name")
parser.add_option('--description',
action="store",
dest="description",
metavar="FILE",
default="",
help="Testrail description")
parser.add_option('--plan-id',
action="store",
dest="planId",
metavar="FILE",
default="",
help="Existing plan id")
示例14: options
# 需要导入模块: from nose.plugins.base import Plugin [as 别名]
# 或者: from nose.plugins.base.Plugin import options [as 别名]
def options(self, parser, env):
"""
Register command line options
"""
parser.add_option("--marvin-config", action="store",
default=env.get('MARVIN_CONFIG', './datacenter.cfg'),
dest="config_file",
help="Marvin's configuration file where the " +
"datacenter information is specified " +
"[MARVIN_CONFIG]")
parser.add_option("--load", action="store_true", default=False,
dest="load",
help="Only load the deployment configuration given")
Plugin.options(self, parser, env)
示例15: options
# 需要导入模块: from nose.plugins.base import Plugin [as 别名]
# 或者: from nose.plugins.base.Plugin import options [as 别名]
def options(self, parser, env):
"""Add API key/value to the parser"""
Plugin.options(self, parser, env)
parser.add_option(
"--testlink-endpoint", action="store",
dest="testlink_endpoint", default="http://localhost/lib/api/v1/xmlapi.php",
help="""
API endpoint for communicating with your Testlink instance
""")
parser.add_option(
"--testlink-key", action="store",
dest="testlink_key", default=None,
help="""
Developer key for accessing your Testlink API
""")
parser.add_option(
"--plan-name", action="store",
dest="plan_name", default=None,
help = """
Test plan name for this run
""")
parser.add_option(
"--project-name", action="store",
dest="project_name", default=None,
help = """
Test plan name for this run
""")
parser.add_option(
"--build-name", action="store",
dest="build_name", default=None,
help = """
The build name for this run. Note if this is not
given or not found, it will automatically create one
"""
)
parser.add_option(
'--generate-build', action='store_true',
dest='generate_build', default=False
)
parser.add_option(
'--overwrite', action='store_true',
dest='overwrite', default=False
)
parser.add_option(
"--platform-name", action="store",
dest="platform_name", default=None,
help="""
The platform to associate with this run
"""
)