Пример #1
0
    def report(self, verbose=False):
        if verbose:
            p = self.prefix + ": "
            if self.step:
                q = u" (step " + six.text_type(self.step) + u")"
            else:
                q = ""
            if self.worker:
                for r in self.worker.report(verbose):
                    yield p + r
                    p = " " * len(self.prefix) + ": "
                if p == " " * len(self.prefix) + ": ":
                    p = " " * (len(self.prefix) - 2) + "at: "
            if self.seq:
                for r in self.seq.report(False):
                    yield p + r + q
                    p = " " * len(self.prefix) + ": "
                    q = ""
                p = " " * (len(self.prefix) - 2) + "ev: "
                for r in report_(self.seq.event, False):
                    yield p + r
                    p = " " * len(self.prefix) + ": "

        else:
            yield self.prefix + u": " + six.text_type(self.worker)
Пример #2
0
	def report(self, verbose=False):
		if verbose:
			p = self.prefix+": "
			if self.step:
				q = u" (step "+six.text_type(self.step)+u")"
			else:
				q = ""
			if self.worker:
				for r in self.worker.report(verbose):
					yield p+r
					p = " "*len(self.prefix)+": "
				if p == " "*len(self.prefix)+": ":
					p = " "*(len(self.prefix)-2)+"at: "
			if self.seq:
				for r in self.seq.report(False):
					yield p+r+q
					p = " "*len(self.prefix)+": "
					q = ""
				p = " "*(len(self.prefix)-2)+"ev: "
				for r in report_(self.seq.event,False):
					yield p+r
					p = " "*len(self.prefix)+": "

		else:
			yield self.prefix+u": "+six.text_type(self.worker)
Пример #3
0
 def log_event(self, event, level):
     if level >= self.level:
         for r in report_(event, 99):
             self._wlog(LogNames[level], r)
         if TESTING:
             self.flush()
Пример #4
0
	def log_event(self, event, level):
		if level >= self.level:
			for r in report_(event,99):
				self._wlog(LogNames[level],r)
			if TESTING:
				self.flush()