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"))
def configure(self, options, conf): Plugin.configure(self, options, conf) self.pattern = options.pattern if options.verbosity >= 2: self.verbose = True if self.enabled: err.write("Pattern for matching test mothods is %s\n" % self.pattern)
def configure(self, options, config): '''Configure the plug in''' # Call super Plugin.configure(self, options, config) # --------------------------------------------------------------------- # NOSE # --------------------------------------------------------------------- # Store the configuration self.config = config # Check if processes enabled try: self.fork = 1 != max(int(options.multiprocess_workers), 1) # If multiprocess not available except: self.fork = False # --------------------------------------------------------------------- # CORE # --------------------------------------------------------------------- # Store test target folder self.core_target = os.path.abspath(options.core_target) # Store source folder if options.source: self.source = os.path.abspath(options.source) else: self.source = None # Check if has to search sources self.search_source = options.search_source # Check if has to search tests self.search_test = options.search_test
def options(self, parser, env): Plugin.options(self, parser, env) parser.add_option("--csv-file", \ dest="filename", \ action="store", \ default=env.get("NOSE_CSV_FILE", "log.csv"), \ help=("Name of the report"))
def __init__(self): Plugin.__init__(self) import uuid self.ds_name = "queueblame-%s" % str(uuid.uuid4())[0:6] from collections import defaultdict self.queues_by_test = defaultdict(lambda: defaultdict(dict))
def configure(self, options, conf): """Configure the plugin""" Plugin.configure(self, options, conf) for setting_str in options.env: env_variable, value = setting_str.split('=') os.environ[env_variable] = value
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]"))
def configure(self, options, config): # Configure Plugin.configure(self, options, config) # Set options if options.enable_plugin_specplugin: options.verbosity = max(options.verbosity, 2) self.spec_doctests = options.spec_doctests # Color setup for label, color in list({ 'error': 'red', 'ok': 'green', 'deprecated': 'yellow', 'skipped': 'yellow', 'failure': 'red', 'identifier': 'cyan', 'file': 'blue', }.items()): # No color: just print() really func = lambda text, bold=False: text if not options.no_spec_color: # Color: colorizes! func = partial(colorize, color) # Store in dict (slightly quicker/nicer than getattr) self.color[label] = func # Add attribute for easier hardcoded access setattr(self, label, func)
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.")
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))
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).')
def options(self, parser, env=os.environ): Plugin.options(self, parser, env) parser.add_option( "-u", "--select-unittests", action="store_true", default=False, dest="select_unittests", help="Run all unittests" ) parser.add_option( "--select-databasetests", action="store_true", default=False, dest="select_databasetests", help="Run all database tests" ) parser.add_option( "--select-destructivedatabasetests", action="store_true", default=False, dest="select_destructivedatabasetests", help="Run all destructive database tests" ) parser.add_option( "--select-httptests", action="store_true", default=False, dest="select_httptests", help="Run all HTTP tests" ) parser.add_option( "--select-seleniumtests", action="store_true", default=False, dest="select_seleniumtests", help="Run all Selenium tests" )
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.')
def __init__(self): Plugin.__init__(self) self.stream_capturer = StreamCapturer() self.destination = os.environ.get('IPTEST_SUBPROC_STREAMS', 'capture') # This is ugly, but distant parts of the test machinery need to be able # to redirect streams, so we make the object globally accessible. nose.iptest_stdstreams_fileno = self.get_write_fileno
def __init__(self): Plugin.__init__(self) self.ccs = [] self.container_started = False self.blames = {"scidata": [], "state": [], "directory": [], "events": [], "resources": [], "objects": []} self.last_blame = {} self.sysname = None
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)
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")
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")
def configure(self, options, config): Plugin.configure(self, options, config) self.config = config if not self.enabled: return self._sink = Sink()
def configure(self, options, conf): log.debug("Configuring PSCTest2NosePlugin") Plugin.configure(self, options, conf) self.conf = conf if hasattr(self.conf.options, 'collect_only'): self.collect_only = getattr(self.conf.options, 'collect_only') log.debug("self.collect_only is %s" % self.collect_only) self.buildConfig = getattr(self.conf.options, 'build_config') if hasattr(self.conf.options, 'build_config') else None
def configure(self, options, conf): """ Called after the command line has been parsed, with the parsed options and the config container. Here, implement any config storage or changes to state or operation that are set by command line options. DO NOT return a value from this method unless you want to stop all other plugins from being configured. """ Plugin.configure(self, options, conf) connection.use_debug_cursor = True
def configure(self, options, conf): """Configure the plugin based on provided options""" Plugin.configure(self, options, conf) if options.show_each_error: self.show_each_error = True if options.show_each_failure: self.show_each_failure = True
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")
def __init__(self): Plugin.__init__(self) self.ccs = [] self.container_started = False self.blames = {'scidata':[], 'state':[], 'directory':[], 'events':[], 'resources':[], 'objects':[]} self.last_blame = {} self.sysname = None
def configure(self, options, conf): Plugin.configure(self, options, conf) conf.exclude = map(re.compile, tolist(r'^(manage\.py|.*settings\.py|apps)$')) if options.django_settings and self.env is not None: self.env['DJANGO_SETTINGS_MODULE'] = options.django_settings self.verbosity = conf.verbosity
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", )
def add_options(self, parser, env=os.environ): # keep copy so we can make our setting in the env we were passed self.env = env Plugin.add_options(self, parser, env) parser.add_option('--django-settings', action='store', dest='django_settings', default=None, help="Set module as the DJANGO_SETTINGS_MODULE" " environment variable.")
def configure(self, options, config): Plugin.configure(self, options, config) #== if not self.enabled: return #== self.report_path = options.report_file if options.template_file: self.html_path, self.template_path = os.path.split(options.template_file)
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]"))
def __init__(self): Plugin.__init__(self) self.execution_guid = str(uuid.uuid4()) self.testcase_guid = None self.execution_start_time = 0 self.case_start_time = 0 self.application = None self.testcase_manager = None self.error_handled = False
def configure(self, options, config): #print "Configuring nose plugin:", self.name # dbg Plugin.configure(self, options, config) self.doctest_tests = options.ipdoctest_tests self.extension = tolist(options.ipdoctest_extension) self.parser = IPDocTestParser() self.finder = DocTestFinder(parser=self.parser) self.checker = IPDoctestOutputChecker() self.globs = None self.extraglobs = None
def options(self, parser, env=os.environ): Plugin.options(self, parser, env=env) parser.add_option('--build_username', action='store', type="string", dest="username", default="iikdvt", help="Username device is provisioned to.") parser.add_option('--build_password', action='store', type="string", dest="password", default="iik1sfun", help="Password of username device is provisioned to.") parser.add_option('--build_hostname', action='store', type="string", dest="hostname", default="test.idigi.com", help="Server device is connected to.") parser.add_option('--build_device_type', action='store', type="string", dest="device_type", default="Linux Application", help="Device Type to Use for Config Tool.") parser.add_option('--build_firmware_version', action='store', type='string', dest="firmware_version", default="1.0.0.0", help="Firmware Version to Use for Config Tool.") parser.add_option('--build_config_tool_jar', action='store', type="string", dest="config_tool_jar", default="ConfigGenerator.jar", help="Config Tool Jar used to generate RCI Config Code") parser.add_option('--build_keystore', action='store', type="string", dest="keystore", default=None, help="Keystore for Config Tool to use for SSL trust.") parser.add_option('--build_cflags', action='store', type="string", dest="cflags", help="CFLAGS to add to compile", default="") parser.add_option('--build_src', action='store', type="string", dest="src", help="Source Directory to Build From.", default=".")
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]")
def options(self, parser, env): """Sets additional command line options.""" Plugin.options(self, parser, env) parser.add_option( '--customxunit-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 configure(self, options, config): Plugin.configure(self, options, config) if options.enable_plugin_spec: options.verbosity = max(options.verbosity, 2) if options.spec_color: self._colorize = lambda color: lambda text: in_color(color, text) else: self._colorize = lambda color: lambda text: text self.spec_doctests = options.spec_doctests
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]"))
def configure(self, options, conf): Plugin.configure(self, options, conf) self.stream = None self.enabled = True self.has_failed_tests = False self.good_tests = [] self.function_calls = {} self.calls = {} self.app_paths = filter(bool, map(normalize_path, options.mutant_path or [])) self.exclude_paths = filter( bool, map(normalize_path, options.mutant_exclude or []))
def options(self, parser, env): """Register commandline options. """ Plugin.options(self, parser, env) parser.add_option('--seed', action='store', dest='seed', default=None, type=int, help="Initialize the seed " "for deterministic behavior in " "reproducing failed tests")
def options(self, parser, env=os.environ): Plugin.options(self, parser, env) parser.add_option('--spec-color', action='store_true', dest='spec_color', default=env.get('NOSE_SPEC_COLOR'), help="Show coloured (red/green) output for specifications " "[NOSE_SPEC_COLOR]") parser.add_option('--spec-doctests', action='store_true', dest='spec_doctests', default=env.get('NOSE_SPEC_DOCTESTS'), help="Include doctests in specifications " "[NOSE_SPEC_DOCTESTS]")
def configure(self, options, conf): """Set the configuration""" if options.lettuce_path: self._base_path = options.lettuce_path else: self._base_path = os.path.join(conf.workingDir, "features") conf.lettuce_verbosity = options.lettuce_verbosity conf.lettuce_scenarios = options.lettuce_scenarios Plugin.configure(self, options, conf)
def __init__(self): try: env.boardId = sys.argv[1] if env.boardId == "-h": print "Syntax: mp7jeeves BOARDID --optionals" return sys.argv.pop(1) except: print "Is that the right command structure? (mp7jeeves BOARDID --optionals)" raise Plugin.__init__(self)
def options(self, parser, env): """ Add options to command line. """ Plugin.options(self, parser, env) parser.add_option('--xcoverage-file', action='store', default=env.get('NOSE_XCOVER_FILE', 'coverage.xml'), dest='xcoverage_file', metavar="FILE", help='Path to xml file to store the coverage report in. ' 'Default is coverage.xml in the working directory. ' '[NOSE_XCOVERAGE_FILE]')
def options(self, parser, env=os.environ): Plugin.options(self, parser, env) opt = parser.add_option opt("--log-info", action="callback", type="string", callback=_log, help="turn on info logging for <LOG> (multiple OK)") opt("--log-debug", action="callback", type="string", callback=_log, help="turn on debug logging for <LOG> (multiple OK)") opt("--require", action="append", dest="require", default=[], help="require a particular driver or module version (multiple OK)") opt("--db", action="store", dest="db", default="sqlite", help="Use prefab database uri") opt('--dbs', action='callback', callback=_list_dbs, help="List available prefab dbs") opt("--dburi", action="store", dest="dburi", help="Database uri (overrides --db)") opt("--dropfirst", action="store_true", dest="dropfirst", help="Drop all tables in the target database first (use with caution on Oracle, " "MS-SQL)") opt("--mockpool", action="store_true", dest="mockpool", help="Use mock pool (asserts only one connection used)") opt("--zero-timeout", action="callback", callback=_zero_timeout, help="Set pool_timeout to zero, applies to QueuePool only") opt("--low-connections", action="store_true", dest="low_connections", help="Use a low number of distinct connections - i.e. for Oracle TNS" ) opt("--enginestrategy", action="callback", type="string", callback=_engine_strategy, help="Engine strategy (plain or threadlocal, defaults to plain)") opt("--reversetop", action="store_true", dest="reversetop", default=False, help="Use a random-ordering set implementation in the ORM (helps " "reveal dependency issues)") opt("--with-cdecimal", action="store_true", dest="cdecimal", default=False, help="Monkeypatch the cdecimal library into Python 'decimal' for all tests") opt("--unhashable", action="store_true", dest="unhashable", default=False, help="Disallow SQLAlchemy from performing a hash() on mapped test objects.") opt("--noncomparable", action="store_true", dest="noncomparable", default=False, help="Disallow SQLAlchemy from performing == on mapped test objects.") opt("--truthless", action="store_true", dest="truthless", default=False, help="Disallow SQLAlchemy from truth-evaluating mapped test objects.") opt("--serverside", action="callback", callback=_server_side_cursors, help="Turn on server side cursors for PG") opt("--mysql-engine", action="store", dest="mysql_engine", default=None, help="Use the specified MySQL storage engine for all tables, default is " "a db-default/InnoDB combo.") opt("--table-option", action="append", dest="tableopts", default=[], help="Add a dialect-specific table option, key=value") opt("--write-profiles", action="store_true", dest="write_profiles", default=False, help="Write/update profiling data.") global file_config file_config = ConfigParser.ConfigParser() file_config.readfp(StringIO.StringIO(base_config)) file_config.read(['test.cfg', os.path.expanduser('~/.satest.cfg')]) config.file_config = file_config
def options(self, parser, env=os.environ): Plugin.options(self, parser, env=env) parser.add_option('--ic-username', action='store', type="string", dest="username", default="iikdvt", help="Username device is provisioned to.") parser.add_option( '--ic-password', action='store', type="string", dest="password", default="iik1sfun", help="Password of username device is provisioned to.") parser.add_option('--ic-hostname', action='store', type="string", dest="hostname", default="test.idigi.com", help="Server device is connected to.") parser.add_option('--ic-deviceid', action='store', type="string", dest="device_id", default="00000000-00000000-00409DFF-FF432317", help="Device ID of device running iDigi Connector.") parser.add_option('--ic-vendorid', action='store', type="string", dest="vendor_id", default="16777242", help="Vendor ID of device running iDigi Connector.") parser.add_option( '--ic-devicetype', action='store', type="string", dest="device_type", default="ECC DVT", help="Device Type of device runnning iDigi Connector.") parser.add_option('--ic-ipaddr', action='store', type="string", dest="ipaddr", default="0.0.0.0", help="IP address of device under test.") parser.add_option('--ic-configuration', action='store', type="string", dest="configuration", default="default", help="Cloud Connector configuration mode to run")
def configure(self, options, conf): Plugin.configure(self, options, conf) self.idfile = os.path.expanduser(options.testIdFile) if not os.path.isabs(self.idfile): self.idfile = os.path.join(conf.workingDir, self.idfile) self.id = 1 # Ids and tests are mirror images: ids are {id: test address} and # tests are {test address: id} self.ids = {} self.tests = {} # used to track ids seen when tests is filled from # loaded ids file self._seen = {}
def options(self, parser, env=os.environ): Plugin.options(self, parser, env) parser.add_option( "--html-report-file", action="store", #default="nose_report.html", dest="report_file", help="File to output HTML report to") parser.add_option("--html-template-file", action="store", default=html_path / default_template, dest="template_file", help="jinja template used to output HTML ")
def configure(self, options, config): Plugin.configure(self, options, config) if self.enabled: config.options.noSkip = True self.result = dict(summary={}, testcases=[]) self.result['summary'] = { 'errors': 0, 'failures': 0, 'passed': 0, 'skip': 0 } self.testsuite_name = options.html_testsuite_name self.output_file = options.html_file
def configure(self, options, config): """Configures the xunit plugin.""" Plugin.configure(self, options, config) self.config = config if self.enabled: self.jinja = Environment( loader=FileSystemLoader(os.path.join(os.path.dirname(__file__), 'templates')), trim_blocks=True, lstrip_blocks=True ) self.stats = {'errors': 0, 'failures': 0, 'passes': 0, 'skipped': 0} self.report_data = defaultdict(Group) self.report_file = codecs.open(options.html_file, 'w', self.encoding, 'replace')
def options(self, parser, env): """Register commandline options. """ Plugin.options(self, parser, env) parser.add_option('--id-file', action='store', dest='testIdFile', default='.noseids', metavar="FILE", help="Store test ids found in test runs in this " "file. Default is the file .noseids in the " "working directory.") parser.add_option('--failed', action='store_true', dest='failed', default=False, help="Run the tests that failed in the last " "test run.")
def configure(self, options, config): Plugin.configure(self, options, config) # Pull standard doctest plugin out of config; we will do doctesting config.plugins.plugins = [p for p in config.plugins.plugins if p.name != 'doctest'] self.doctest_tests = options.doctest_tests self.extension = tolist(options.doctestExtension) self.parser = doctest.DocTestParser() self.finder = DocTestFinder() self.checker = IPDoctestOutputChecker() self.globs = None self.extraglobs = None
def options(self, parser, env=os.environ): logger.debug("options(self, parser, env = os.environ):...") parser.add_option( "--psprofile-file", action="store", default=env.get("NOSE_PSP_FILE", "psprofile.json"), dest="psp_file", metavar="FILE", help= "By Default a psprofile.json is generated in the current working directory" ) Plugin.options(self, parser, env)
def options(self, parser, env=os.environ): Plugin.options(self, parser, env) opt = parser.add_option def make_option(name, **kw): callback_ = kw.pop("callback", None) or kw.pop("zeroarg_callback", None) if callback_: def wrap_(option, opt_str, value, parser): callback_(opt_str, value, parser) kw["callback"] = wrap_ opt(name, **kw) plugin_base.setup_options(make_option) plugin_base.read_config()
def __init__(self): Plugin.__init__(self) self.ccs = [] self.container_started = False self.blames = { 'scidata': [], 'state': [], 'directory': [], 'events': [], 'resources': [], 'objects': [] } self.last_blame = {} self.sysname = None
def configure(self, options, conf): Plugin.configure(self, options, conf) if self.enabled: # browser-help is a usage call if getattr(options, 'browser_help'): self._browser_help() # get options from command line or config file if options.config_file: self.ingest_config_file(options.config_file) else: self.ingest_options(options) ### Validation ### # local if BROWSER_LOCATION == 'local': self._check_validity(BROWSER, self._valid_browsers_for_local) # sauce elif BROWSER_LOCATION == 'sauce': valid_browsers_for_sauce, valid_oses_for_sauce, combos = self._get_sauce_options() if not SAUCE_USERNAME or not SAUCE_APIKEY: raise TypeError("'sauce' value for --browser-location " "requires --sauce-username and --sauce-apikey.") self._check_validity(BROWSER, valid_browsers_for_sauce) if not OS: raise TypeError( "'sauce' value for --browser-location requires the --os option.") self._check_validity(OS, valid_oses_for_sauce, flag="--os") # remote elif BROWSER_LOCATION == 'remote': self._check_validity(BROWSER, self._valid_browsers_for_remote) if not REMOTE_ADDRESS: raise TypeError( "'remote' value for --browser-location requires --remote-address.") # grid elif BROWSER_LOCATION == 'grid': self._check_validity(BROWSER, self._valid_browsers_for_remote) if not REMOTE_ADDRESS: raise TypeError( "'grid' value for --browser-location requires --grid-address.") if not OS: raise TypeError( "'grid' value for --browser-location requires the --os option.")
def options(self, parser, env=os.environ): Plugin.options(self, parser, env) parser.add_option( '--config-file', action='store', dest='config_file', help= 'Load options from a config file instead of enter via the command line.' ) valid_location_options = [ 'develop', 'staging', 'dogfood', 'production' ] parser.add_option('--env', action='store', choices=valid_location_options, dest='environment', help='Run the browser in this location (options ' + self._stringify_options(valid_location_options) + ').') parser.add_option( '--browser', action='store', dest='browser', help='Select the type of browser you want Selenium to use.') parser.add_option('--baseurl', action='store', dest='base_url', help='base url of the application in test.') parser.add_option('--timeout', action='store', dest='timeout', type='str', help='Change the timeout on the fly.') parser.add_option('--fbuser', action='store', dest='fb_user', help='Facebook username') parser.add_option('--fbpass', action='store', dest='fb_pass', help='Facebook password') parser.add_option( '--logging', action='store', dest='logging', help= 'Set logging level (debug, info, warn, error, critical). Disabled by default.' )
def configure(self, options, config): # print "Configuring nose plugin:", self.name # dbg Plugin.configure(self, options, config) # Pull standard doctest plugin out of config; we will do doctesting config.plugins.plugins = [ p for p in config.plugins.plugins if p.name != "doctest" ] self.doctest_tests = options.ipdoctest_tests self.extension = tolist(options.ipdoctest_extension) self.parser = IPDocTestParser() self.finder = DocTestFinder(parser=self.parser) self.checker = IPDoctestOutputChecker() self.globs = None self.extraglobs = None
def options(self, parser, env=None): Plugin.options(self, parser, env) omaker = make_option_maker(parser, dest_prefix="dbdump", env_prefix="NOSE_DBDUMP", cmdline_prefix="dbdump") omaker('databases', action="append", help="Dump the selected databases") omaker('output', help="Path to store the database dump") omaker('dsn', help="engine://[user[:password]@]hostname[:port]") omaker('keep', action='store_true', help="Don't delete the database dump")
def options(self, parser, env=os.environ): Plugin.options(self, parser, env) parser.add_option('--no-spec-color', action='store_true', dest='no_spec_color', default=env.get('NOSE_NO_SPEC_COLOR'), help="Don't show colors with --with-spec" "[NOSE_NO_SPEC_COLOR]") parser.add_option('--spec-doctests', action='store_true', dest='spec_doctests', default=env.get('NOSE_SPEC_DOCTESTS'), help="Include doctests in specifications " "[NOSE_SPEC_DOCTESTS]") parser.add_option('--no-detailed-errors', action='store_false', dest='detailedErrors', help="Force detailed errors off")
def configure(self, options, conf): Plugin.configure(self, options, conf) if not self.enabled: return self.cflags = options.cflags self.src = options.src self.username = options.username self.password = options.password self.hostname = options.hostname self.device_type = options.device_type self.firmware_version = options.firmware_version self.config_tool_jar = options.config_tool_jar self.keystore = options.keystore