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


Python Plugin.configure方法代码示例

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


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

示例1: configure

# 需要导入模块: from nose.plugins import Plugin [as 别名]
# 或者: from nose.plugins.Plugin import configure [as 别名]
    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
开发者ID:msabramo,项目名称:python-noseenv,代码行数:9,代码来源:__init__.py

示例2: configure

# 需要导入模块: from nose.plugins import Plugin [as 别名]
# 或者: from nose.plugins.Plugin import configure [as 别名]
 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
开发者ID:kassoulet,项目名称:NoseXUnitLite,代码行数:27,代码来源:plugin.py

示例3: configure

# 需要导入模块: from nose.plugins import Plugin [as 别名]
# 或者: from nose.plugins.Plugin import configure [as 别名]
 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)
开发者ID:douglas,项目名称:spec,代码行数:28,代码来源:plugin.py

示例4: configure

# 需要导入模块: from nose.plugins import Plugin [as 别名]
# 或者: from nose.plugins.Plugin import configure [as 别名]
	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)
开发者ID:ArthurWu,项目名称:e-leave,代码行数:9,代码来源:plugin_RegexPicker.py

示例5: configure

# 需要导入模块: from nose.plugins import Plugin [as 别名]
# 或者: from nose.plugins.Plugin import configure [as 别名]
 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
开发者ID:perfectsearch,项目名称:sandman,代码行数:10,代码来源:psctest2noseplugin.py

示例6: configure

# 需要导入模块: from nose.plugins import Plugin [as 别名]
# 或者: from nose.plugins.Plugin import configure [as 别名]
    def configure(self, options, config):
        Plugin.configure(self, options, config)

        self.config = config
        if not self.enabled:
            return

        self._sink = Sink()
开发者ID:thschenk,项目名称:nosetests-json-extended,代码行数:10,代码来源:plugin.py

示例7: configure

# 需要导入模块: from nose.plugins import Plugin [as 别名]
# 或者: from nose.plugins.Plugin import configure [as 别名]
  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
开发者ID:cfdrake,项目名称:nose-pynotify,代码行数:10,代码来源:nose_pynotify.py

示例8: configure

# 需要导入模块: from nose.plugins import Plugin [as 别名]
# 或者: from nose.plugins.Plugin import configure [as 别名]
 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
开发者ID:brosner,项目名称:django-sqlalchemy,代码行数:10,代码来源:plugin.py

示例9: configure

# 需要导入模块: from nose.plugins import Plugin [as 别名]
# 或者: from nose.plugins.Plugin import configure [as 别名]
 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
开发者ID:7mp,项目名称:django-dynamic-fixture,代码行数:10,代码来源:nose_plugin.py

示例10: configure

# 需要导入模块: from nose.plugins import Plugin [as 别名]
# 或者: from nose.plugins.Plugin import configure [as 别名]
 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)
开发者ID:geographika,项目名称:nose-html-report,代码行数:11,代码来源:nosehtml.py

示例11: configure

# 需要导入模块: from nose.plugins import Plugin [as 别名]
# 或者: from nose.plugins.Plugin import configure [as 别名]
    def configure(self, options, config):
        global HTTP_PORT, SELENIUM_GRID_PORT
        Plugin.configure(self, options, config)

        HTTP_PORT = options.HTTP_PORT
        SELENIUM_GRID_PORT = options.SELENIUM_GRID_PORT
        self.browsers = options.browsers

        self.enabled = True
开发者ID:bogtan,项目名称:Naaya,代码行数:11,代码来源:SeleniumTestCase.py

示例12: configure

# 需要导入模块: from nose.plugins import Plugin [as 别名]
# 或者: from nose.plugins.Plugin import configure [as 别名]
    def configure(self, options, config):
        Plugin.configure(self, options, config)
        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
开发者ID:sunqiang,项目名称:ipython-py3k,代码行数:12,代码来源:ipdoctest.py

示例13: configure

# 需要导入模块: from nose.plugins import Plugin [as 别名]
# 或者: from nose.plugins.Plugin import configure [as 别名]
 def configure(self, options, conf):
     self.hash_file = os.path.join(conf.workingDir, self.hash_file)
     if os.path.isfile(self.hash_file):
         log.debug("Loading last known hashes and dependency graph")
         f = open(self.hash_file, 'r')
         data = load(f)
         f.close()
         self._known_hashes = data['hashes']
         self._known_graph = data['graph']
     Plugin.configure(self, options, conf)
开发者ID:exfm,项目名称:bazinga,代码行数:12,代码来源:__init__.py

示例14: configure

# 需要导入模块: from nose.plugins import Plugin [as 别名]
# 或者: from nose.plugins.Plugin import configure [as 别名]
    def configure(self, options, conf):
        Plugin.configure(self, options, conf)

        import testing, requires
        testing.db = db
        testing.requires = requires

        # Lazy setup of other options (post coverage)
        for fn in post_configure:
            fn(options, file_config)
开发者ID:greghaynes,项目名称:xsbs,代码行数:12,代码来源:noseplugin.py

示例15: configure

# 需要导入模块: from nose.plugins import Plugin [as 别名]
# 或者: from nose.plugins.Plugin import configure [as 别名]
 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 [ ]))
开发者ID:arnauorriols,项目名称:PyMuTester,代码行数:12,代码来源:nose_plugins.py


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