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]")) parser.add_option( '--xunit-testsuite-name', action='store', dest='xunit_testsuite_name', metavar="PACKAGE", default=env.get('NOSE_XUNIT_TESTSUITE_NAME', 'nosetests'), help=( "Name of the testsuite in the xunit xml, generated by plugin. " "Default test suite name is nosetests.")) parser.add_option('--xunit-show-docstrings', dest='show_docstrings', action='store_true', default=False, help='Adds docstrings to the xunit output.')
def options(self, parser, env): """Add options to control coverage.""" log.debug('nose-cov options') Plugin.options(self, parser, env) parser.add_option('--cov', action='append', default=env.get('NOSE_COV', []), metavar='PATH', dest='cov_source', help=('Measure coverage for filesystem path ' '[NOSE_COV]')) parser.add_option( '--cov-report', action='append', default=env.get('NOSE_COV_REPORT', []), metavar='TYPE', choices=['term', 'term-missing', 'annotate', 'html', 'xml'], dest='cov_report', help= ('Generate selected reports, available types: term, term-missing, annotate, html, xml ' '[NOSE_COV_REPORT]')) parser.add_option( '--cov-config', action='store', default=env.get('NOSE_COV_CONFIG', '.coveragerc'), metavar='FILE', dest='cov_config', help=('Config file for coverage, default: .coveragerc ' '[NOSE_COV_CONFIG]'))
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)
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)
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]")
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]")) parser.add_option( '--xunit-testsuite-name', action='store', dest='xunit_testsuite_name', metavar="PACKAGE", default=env.get('NOSE_XUNIT_TESTSUITE_NAME', 'nosetests'), help=( "Name of the testsuite in the xunit xml, generated by plugin. " "Default test suite name is nosetests.")) parser.add_option( '--xunit-prefix-with-testsuite-name', action='store_true', dest='xunit_prefix_class', default=bool( env.get('NOSE_XUNIT_PREFIX_WITH_TESTSUITE_NAME', False)), help= ("Whether to prefix the class name under test with testsuite name. " "Defaults to false."))
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)
def options(self, parser, env): """Register commandline options. """ if not self.available(): return Plugin.options(self, parser, env) parser.add_option('--profile-sort', action='store', dest='profile_sort', default=env.get('NOSE_PROFILE_SORT', 'cumulative'), metavar="SORT", help="Set sort order for profiler output") parser.add_option('--profile-stats-file', action='store', dest='profile_stats_file', metavar="FILE", default=env.get('NOSE_PROFILE_STATS_FILE'), help='Profiler stats file; default is a new ' 'temp file on each run') parser.add_option('--profile-restrict', action='append', dest='profile_restrict', metavar="RESTRICT", default=env.get('NOSE_PROFILE_RESTRICT'), help="Restrict profiler output. See help for " "pstats.Stats for details")
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 )
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'))
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)
def options(self, parser, env): """Sets additional command line options.""" Plugin.options(self, parser, env) parser.add_option("--html-out-file", action="store", default=env.get('NOSE_HTML_OUT_FILE', 'results.html'), dest="html_file", metavar="FILE", help="Produce results in the specified HTML file." "[NOSE_HTML_OUT_FILE]") parser.add_option("--html-out-title", action="store", default=env.get('NOSE_HTML_OUT_TITLE', 'Unittest Report'), dest="html_title", help="The Title of the report in HTML" "[NOSE_HTML_OUT_TITLE]") parser.add_option("--html-jinja-template", action="store", default=env.get( 'NOSE_HTML_JINJA_TEMPLATE', os.path.join(os.path.dirname(__file__), "templates", "report.jinja2")), dest="html_template", metavar="FILE", help="jinja2 template file" "[NOSE_HTML_JINJA_TEMPLATE]")
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.')
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
def options(self, parser, env): browsers = Browser.get_supported_browsers() parser.add_option('-b', '--browser', help="Specify browser by using initials. " \ "If value was not passed then 'ff' will be used. " \ "Supported choices: %s" % browsers, choices=browsers) Plugin.options(self, parser, env)
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
def options(self, parser, env): Plugin.options(self, parser, env) parser.add_option('--html-file', action='store', dest='html_file', default=env.get('NOSE_HTML_FILE', 'test_report.html'), metavar="FILE", help="HTML log file name")
def options(self, parser, env): browsers = Browser.get_supported_browsers() parser.add_option('-b', '--browser', help="Specify browser by using initials. " "If value was not passed then 'ff' will be used. " "Supported choices: %s" % browsers, choices=browsers) Plugin.options(self, parser, env)
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")
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'))
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)
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]"))
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]"))
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))
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")
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")
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 """ )
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)
def options(self, parser, env): """Register commandline options. """ Plugin.options(self, parser, env) parser.add_option('--cprofile-stats-file', action='store', dest='profile_stats_file', metavar="FILE", default="stats.dat", help='Output file name; default "stats.dat"') parser.add_option("--cprofile-stats-erase", action="store_true", default=env.get('NOSE_PROFILE_STATS_ERASE'), dest="stats_erase", help="Erase previously-collected profiling " "statistics before run")
def options(self, parser, env): """ Add options to command line. """ Plugin.options(self, parser, env) parser.add_option("--cover2-package", action="append", default=env.get('NOSE_COVER2_PACKAGE'), metavar="PACKAGE", dest="cover2_packages", help="Restrict coverage output to selected packages " "[NOSE_COVER2_PACKAGE]") parser.add_option("--cover2-erase", action="store_true", default=env.get('NOSE_COVER2_ERASE'), dest="cover2_erase", help="Erase previously collected coverage " "statistics before run") parser.add_option("--cover2-tests", action="store_true", dest="cover2_tests", default=env.get('NOSE_COVER2_TESTS'), help="Include test modules in coverage report " "[NOSE_COVER2_TESTS]") parser.add_option("--cover2-inclusive", action="store_true", dest="cover2_inclusive", default=env.get('NOSE_COVER2_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_COVER2_INCLUSIVE]") parser.add_option("--cover2-html", action="store_true", default=env.get('NOSE_COVER2_HTML'), dest='cover2_html', help="Produce HTML coverage information") parser.add_option('--cover2-html-dir', action='store', default=env.get('NOSE_COVER2_HTML_DIR', 'cover_html'), dest='cover2_html_dir', metavar='DIR', help='Produce HTML coverage information in dir') parser.add_option('--cover2-cobertura', action='store_true', default=env.get('NOSE_COVER2_COBERTURA'), dest='cover2_cobertura', help='Produce cobertura compatible output')
def options(self, parser, env=os.environ): Plugin.options(self, parser, env) parser.add_option('--profile-sort', action='store', dest='profile_sort', default=env.get('NOSE_PROFILE_SORT', 'cumulative'), help="Set sort order for profiler output") parser.add_option('--profile-stats-file', action='store', dest='profile_stats_file', default=env.get('NOSE_PROFILE_STATS_FILE'), help='Profiler stats file; default is a new ' 'temp file on each run') parser.add_option('--profile-restrict', action='append', dest='profile_restrict', default=env.get('NOSE_PROFILE_RESTRICT'), help="Restrict profiler output. See help for " "pstats.Stats for details")
def options(self, parser, env=None): env = env or os.environ Plugin.options(self, parser, env) parser.add_option('--django-settings', action='store', default=env.get('DJANGO_SETTINGS_MODULE'), dest='settings', help='Settings module of your ' \ 'Django project to test. [DJANGO_SETTINGS_MODULE]') parser.add_option('--django-verbosity', action='store', default=1, dest='verbosity', type='int', help='Django verbosity level.') parser.add_option('--twill-error-dir', action='store', default=env.get('TWILL_ERROR_DIR'), dest='error_dir', help='If `TwillAssertionError` raised store all ' \ 'output in this directory. [TWILL_ERROR_DIR]')
def options(self, parser, env): """Register commandline options. """ Plugin.options(self, parser, env) parser.add_option('--cprofile-stats-file', action='store', dest='profile_stats_file', metavar="FILE", default="stats.dat", help='Output file name; default "stats.dat"') parser.add_option("--cprofile-stats-erase", action="store_true", default=env.get('NOSE_PROFILE_STATS_ERASE'), dest="stats_erase", help="Erase previously-collected profiling " "statistics before run")
def options(self, parser, env): """Sets additional command line options.""" Plugin.options(self, parser, env) parser.add_option( '--testdata-file', action='store', dest='testdata_file', metavar="FILE", default=env.get('NOSE_TESTDATA_FILE', 'testdata.csv'), help=("Path to CSV file to store the test data. " "Default is testdata.csv in the working directory " "[NOSE_TESTDATA_FILE]")) parser.add_option( '--testdata-table', action='store_true', dest='testdata_table', default=env.get('NOSE_TESTDATA_TABLE', False), help=("If this option is specified, then the CSV file is " " formatted as a table. By default, the format is a sparse list. "))
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_XUNI_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( '--xunit-header', action='store', dest='xunit_header', metavar="HEADER", default=env.get('NOSE_XUNIT_HEADER', ''), help=("The attributes of the <testsuite> report that will be created, in particular 'package' and 'name' should be filled." "[NOSE_XUNIT_HEADER]"))
def options(self, parser, env): """Sets additional command line options.""" Plugin.options(self, parser, env) parser.add_option( '--dtestxunit-file', action='store', dest='dtestxunit_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]")) parser.add_option( '--dtestxunit-testsuite-name', action='store', dest='dtestxunit_testsuite_name', metavar="PACKAGE", default=env.get('NOSE_XUNIT_TESTSUITE_NAME', 'nosetests'), help=("Name of the testsuite in the xunit xml, generated by plugin. " "Default test suite name is nosetests."))
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)
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))
def options(self, parser, env): """Register commandline options. """ Plugin.options(self, parser, env) parser.add_option( "--cprofile-stats-file", action="store", dest="profile_stats_file", metavar="FILE", default=env.get("NOSE_PROFILE_STATS_FILE"), help='Profiler stats file; default "stats.dat"', ) parser.add_option( "--cprofile-stats-erase", action="store_true", default=env.get("NOSE_PROFILE_STATS_ERASE"), dest="stats_erase", help="Erase previously-collected profiling " "statistics before run", )
def options(self, parser, env=os.environ): 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", help="Also look for doctests in files with " "this extension [NOSE_DOCTEST_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_DOCTEST_EXTENSION') if env_setting is not None: parser.set_defaults(doctestExtension=tolist(env_setting))
def options(self, parser, env): """Add options to control coverage.""" log.debug('nose-cov options') Plugin.options(self, parser, env) parser.add_option('--cov', action='append', default=env.get('NOSE_COV', []), metavar='PATH', dest='cov_source', help=('Measure coverage for filesystem path ' '[NOSE_COV]')) parser.add_option('--cov-report', action='append', default=env.get('NOSE_COV_REPORT', []), metavar='TYPE', choices=['term', 'term-missing', 'annotate', 'html', 'xml'], dest='cov_report', help=('Generate selected reports, available types: term, term-missing, annotate, html, xml ' '[NOSE_COV_REPORT]')) parser.add_option('--cov-config', action='store', default=env.get('NOSE_COV_CONFIG', '.coveragerc'), metavar='FILE', dest='cov_config', help=('Config file for coverage, default: .coveragerc ' '[NOSE_COV_CONFIG]'))
def options(self, parser, env): """ Add options to command line. """ Plugin.options(self, parser, env) parser.add_option("--cover-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("--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]") parser.add_option("--cover-html", action="store_true", default=env.get('NOSE_COVER_HTML'), dest='cover_html', help="Produce HTML coverage information") parser.add_option('--cover-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("--cover-branches", action="store_true", dest="cover_branches", default=env.get('NOSE_COVER_BRANCHES'), help="Include branch coverage in coverage report " "[NOSE_COVER_BRANCHES]")
def options(self, parser, env): """Sets additional command line options.""" Plugin.options(self, parser, env) parser.add_option( '--testdata-file', action='store', dest='testdata_file', metavar="FILE", default=env.get('NOSE_TESTDATA_FILE', 'testdata.csv'), help=("Path to CSV file to store the test data. " "Default is testdata.csv in the working directory " "[NOSE_TESTDATA_FILE]")) parser.add_option( '--testdata-table', action='store_true', dest='testdata_table', default=env.get('NOSE_TESTDATA_TABLE', False), help= ("If this option is specified, then the CSV file is " " formatted as a table. By default, the format is a sparse list. " ))
def options(self, parser, env=os.environ): 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", help="Also look for doctests in files with " "this extension [NOSE_DOCTEST_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_DOCTEST_EXTENSION') if env_setting is not None: parser.set_defaults(doctestExtension=tolist(env_setting))
def options(self, parser, env): """Register commandline options. """ if not self.available(): return Plugin.options(self, parser, env) parser.add_option('--profile-sort', action='store', dest='profile_sort', default=env.get('NOSE_PROFILE_SORT', 'cumulative'), metavar="SORT", help="Set sort order for profiler output") parser.add_option('--profile-stats-file', action='store', dest='profile_stats_file', metavar="FILE", default=env.get('NOSE_PROFILE_STATS_FILE'), help='Profiler stats file; default is a new ' 'temp file on each run') parser.add_option('--profile-restrict', action='append', dest='profile_restrict', metavar="RESTRICT", default=env.get('NOSE_PROFILE_RESTRICT'), help="Restrict profiler output. See help for " "pstats.Stats for details")
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]")) parser.add_option( '--xunit-testsuite-name', action='store', dest='xunit_testsuite_name', metavar="PACKAGE", default=env.get('NOSE_XUNIT_TESTSUITE_NAME', 'nosetests'), help=("Name of the testsuite in the xunit xml, generated by plugin. " "Default test suite name is nosetests.")) parser.add_option( '--xunit-prefix-with-testsuite-name', action='store_true', dest='xunit_prefix_class', default=bool(env.get('NOSE_XUNIT_PREFIX_WITH_TESTSUITE_NAME', False)), help=("Whether to prefix the class name under test with testsuite name. " "Defaults to false."))
def options(self, parser, env=os.environ): Plugin.options(self, parser, env)
def options(self, parser, env=os.environ): Plugin.options(self, parser, env) self.doctest_tests = True self._doctest_result_var = None
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.')
def options(self, parser, env): Plugin.options(self, parser, env) parser.add_option("--quickunit-prefix", dest="quickunit_prefix", action="append")
def options(self, parser, env=os.environ): Plugin.options(self, parser, env)
def options(self, parser, env): Plugin.options(self, parser, env)
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"))