Пример #1
0
 def test_process_expression(self):
     self.assertEqual(
         'a&c&b&d|a&c&b&e|f&g',
         booleansimplifier.process_expression(
             'a and (b) and c and (d or e) or f and g'))
     self.assertEqual(
         'checkin&!interactive',
         booleansimplifier.process_expression(
             'checkin and not interactive'))
Пример #2
0
 def __init__(self,
              config=None,
              importer=None,
              workingDir=None,
              selector=JUnitSelector):
     """Initialize a test loader
     """
     TestLoader.__init__(self, config, importer, workingDir, selector)
     log.debug("JUnitTestLoader.__init__(): config = %s", config)
     if hasattr(config.options, 'compiled_root'):
         self.compiledTestsRoot = config.options.compiled_root
         if os.name == "nt":
             self.compiledTestsRoot = self.compiledTestsRoot.replace(
                 "/", "\\")
     log.debug("Compiled root is %s, os is %s", self.compiledTestsRoot,
               os.name)
     # Each element of config.options.attr is a comma-separated list of
     # enabled of disabled test tags
     target_expression = ''
     for expression in config.options.eval_attr:
         if target_expression:
             target_expression = target_expression + '&'
         target_expression = target_expression + '(' + expression + ')'
     self.tags = process_expression(target_expression)
     if not self.tags:
         self.tags = 'checkin&!interactive'
         log.debug("JUnitTestLoader.__init__(): Set default test tasgs")
     log.debug("JUnitTestLoader.__init__(): self.tags: %s", self.tags)
Пример #3
0
 def __init__(self, config = None, importer = None,
              workingDir = None, selector = Selector):
     """Initialize a test loader
     """
     TestLoader.__init__(self, config, importer, workingDir, selector)
     log.debug("CTestTestLoader.__init__(): config = %s", config)
     if hasattr(config.options, 'compiled_root'):
         self.compiledTestsRoot = config.options.compiled_root
     log.debug("Compiled root is %s", self.compiledTestsRoot)
     # Each element of config.options.attr is a comma-separated list of
     # enabled of disabled test tags
     target_expression = ''
     for expression in config.options.eval_attr:
         if target_expression:
             target_expression = target_expression + '&'
         target_expression = target_expression + '(' + expression + ')'
     self.tags = process_expression(target_expression)
     Selector.tags = self.tags
     log.debug("CTestTestLoader.__init__(): set tags for Selector")
     if not self.tags:
         self.tags = 'shareable&!interactive'
         log.debug("CTestTestLoader.__init__(): Set default test tasgs")
     log.debug("CTestTestLoader.__init__(): self.tags: %s", self.tags)
Пример #4
0
 def __init__(self, config = None, importer = None,
              workingDir = None, selector = JUnitSelector):
     """Initialize a test loader
     """
     TestLoader.__init__(self, config, importer, workingDir, selector)
     log.debug("JUnitTestLoader.__init__(): config = %s", config)
     if hasattr(config.options, 'compiled_root'):
         self.compiledTestsRoot = config.options.compiled_root
         if os.name == "nt":
             self.compiledTestsRoot = self.compiledTestsRoot.replace("/", "\\")
     log.debug("Compiled root is %s, os is %s", self.compiledTestsRoot, os.name)
     # Each element of config.options.attr is a comma-separated list of
     # enabled of disabled test tags
     target_expression = ''
     for expression in config.options.eval_attr:
         if target_expression:
             target_expression = target_expression + '&'
         target_expression = target_expression + '(' + expression + ')'
     self.tags = process_expression(target_expression)
     if not self.tags:
         self.tags = 'checkin&!interactive'
         log.debug("JUnitTestLoader.__init__(): Set default test tasgs")
     log.debug("JUnitTestLoader.__init__(): self.tags: %s", self.tags)
 def test_process_expression(self):
     self.assertEqual('a&c&b&d|a&c&b&e|f&g', booleansimplifier.process_expression('a and (b) and c and (d or e) or f and g'))
     self.assertEqual('checkin&!interactive', booleansimplifier.process_expression('checkin and not interactive'))