Exemplo n.º 1
0
 def __init__(self, stream=sys.stderr, descriptions=1, verbosity=1, \
     elapsed_times=True):
     "Create a new instance of _XMLTestResult."
     _TextTestResult.__init__(self, stream, descriptions, verbosity)
     self.successes = []
     self.callback = None
     self.elapsed_times = elapsed_times
Exemplo n.º 2
0
 def __init__(self, stream, descriptions, verbosity):
     _TextTestResult.__init__(self, stream, descriptions, verbosity)
     if not config["publish"]:
         return
     if not "logs" in os.listdir("./src/python/ofreport/"):
         os.mkdir("./src/python/ofreport/" + "logs")
     # Attempt to open and load existing results.json file.
     self.result_file = "./src/python/ofreport/" + "logs/results.json"
     try:
         f = open(self.result_file)
         data = f.read()
         self.result = json.loads(data)
         self.result["profile"] = config['conformance']
     except IOError:
         self.result = {}
         profile_total = {"total": 0, "passed": 0, "failed": 0, "error": 0}
         total = {
             "mandatory": deepcopy(profile_total),
             "optional": deepcopy(profile_total)
         }
         self.result["total"] = total
         self.result["groups"] = {}
         self.result["profile"] = config['conformance']
         f = open(self.result_file, "w")
         f.write(json.dumps(self.result))
     finally:
         f.close()
Exemplo n.º 3
0
 def __init__(self, stream=sys.stderr, descriptions=1, verbosity=1, \
     elapsed_times=True):
     "Create a new instance of _XMLTestResult."
     _TextTestResult.__init__(self, stream, descriptions, verbosity)
     self.successes = []
     self.callback = None
     self.elapsed_times = elapsed_times
Exemplo n.º 4
0
 def __init__(self, stream, descriptions, verbosity, elapsed_times):
     _TextTestResult.__init__(self, stream, descriptions, verbosity)
     self.buffer = True
     self._stdout_data = None
     self._stderr_data = None
     self.successes = []
     self.callback = None
     self.elapsed_times = elapsed_times
     self.infoclass = _TestInfo
Exemplo n.º 5
0
 def __init__(self, stream, descriptions, verbosity, elapsed_times):
     _TextTestResult.__init__(self, stream, descriptions, verbosity)
     self.buffer = True
     self._stdout_data = None
     self._stderr_data = None
     self.successes = []
     self.callback = None
     self.elapsed_times = elapsed_times
     self.infoclass = _TestInfo
Exemplo n.º 6
0
 def __init__(self,
              stream=sys.stderr,
              descriptions=1,
              verbosity=1,
              elapsed_times=True):
     _TextTestResult.__init__(self, stream, descriptions, verbosity)
     self.successes = []
     self.callback = None
     self.elapsed_times = elapsed_times
Exemplo n.º 7
0
 def __init__(self, stream, descriptions, verbosity, config=None,
              errorClasses=None):        
     if errorClasses is None:
         errorClasses = {}
     self.errorClasses = errorClasses
     if config is None:
         config = Config()       
     self.config = config
     _TextTestResult.__init__(self, stream, descriptions, verbosity)
Exemplo n.º 8
0
 def __init__(self,
              stream,
              descriptions,
              verbosity,
              config=None,
              errorClasses=None):
     if errorClasses is None:
         errorClasses = {}
     self.errorClasses = errorClasses
     if config is None:
         config = Config()
     self.config = config
     _TextTestResult.__init__(self, stream, descriptions, verbosity)
Exemplo n.º 9
0
 def __init__(self,
              stream=sys.stderr,
              descriptions=1,
              verbosity=1,
              elapsed_times=True,
              properties=None,
              infoclass=None):
     _TextTestResult.__init__(self, stream, descriptions, verbosity)
     self.rerun = 0
     self.retry = 0
     self.tb_locals = False
     self.buffer = True
     self._stdout_data = None
     self._stderr_data = None
     self.successes = []
     self.tested_fail_error = []
     self.callback = None
     self.properties = properties
     self.elapsed_times = elapsed_times
     if infoclass is None:
         self.infoclass = _TestInfo
     else:
         self.infoclass = infoclass
     self.testRun = 0
Exemplo n.º 10
0
 def __init__(self, stream, descriptions, verbosity):
     _TextTestResult.__init__(self, stream, descriptions, verbosity)
     if not config["publish"]:
         return
     if not "logs" in os.listdir("./src/python/ofreport/"):
         os.mkdir("./src/python/ofreport/" + "logs")
     # Attempt to open and load existing results.json file.
     self.result_file = "./src/python/ofreport/" + "logs/results.json"
     try:
         f = open(self.result_file)
         data = f.read()
         self.result = json.loads(data)
         self.result["profile"] = config['conformance']
     except IOError:
         self.result = {}
         profile_total = {"total": 0, "passed": 0, "failed": 0, "error": 0}
         total = {"mandatory": deepcopy(profile_total), "optional": deepcopy(profile_total)}
         self.result["total"] = total
         self.result["groups"] = {}
         self.result["profile"] = config['conformance']
         f = open(self.result_file, "w")
         f.write(json.dumps(self.result))
     finally:
         f.close()
 def __init__(self, stream, descriptions, verbosity):
     _TextTestResult.__init__(self, stream, descriptions, verbosity)
     self.successes = []
Exemplo n.º 12
0
 def __init__(self, comm, *args, **kwargs):
     ParallelTestResult.__init__(self, comm)
     _TextTestResult.__init__(self, *args, **kwargs) # use new-style?
Exemplo n.º 13
0
 def __init__(self, stream, descriptions, verbosity, conf):        
     self.deprecated = []
     self.skip = []
     self.conf = conf
     self.capture = conf.capture
     _TextTestResult.__init__(self, stream, descriptions, verbosity)
Exemplo n.º 14
0
 def __init__(self, stream, descriptions, verbosity, resultWriter):
     _TextTestResult.__init__(self, stream, descriptions, verbosity)
     self.resultWriter = resultWriter
Exemplo n.º 15
0
 def __init__(self, stream, descriptions, verbosity, resultWriter):
     _TextTestResult.__init__(self, stream, descriptions, verbosity)
     self.resultWriter = resultWriter
Exemplo n.º 16
0
 def __init__(self, comm, *args, **kwargs):
     ParallelTestResult.__init__(self, comm)
     _TextTestResult.__init__(self, *args, **kwargs) # use new-style?
Exemplo n.º 17
0
 def __init__(self, stream, descriptions, verbosity):
     _TextTestResult.__init__(self, stream, descriptions, verbosity)
     self.successes = []
Exemplo n.º 18
0
 def __init__(self, database_path, runid, module_name, stream, descriptions, verbosity):
     _TextTestResult.__init__(self, stream, descriptions, verbosity)
     self.database_path = database_path
     self.params = {'runid': runid,
                    'test': module_name}
 def __init__(self, stream=sys.stderr, descriptions=1, verbosity=1,
              elapsed_times=True):
     _TextTestResult.__init__(self, stream, descriptions, verbosity)
     self.successes = []
     self.callback = None
     self.elapsed_times = elapsed_times
Exemplo n.º 20
0
 def __init__(self, stream, descriptions, verbosity):
     _TextTestResult.__init__(self, stream, descriptions, verbosity)
     self.unimplemented = []