eric7/DebugClients/Python/coverage/collector.py

branch
eric7
changeset 9099
0e511e0e94a3
parent 8929
fcca2fa618bf
equal deleted inserted replaced
9098:fb9351497cea 9099:0e511e0e94a3
143 if len(light_threads) > 1: 143 if len(light_threads) > 1:
144 show = ", ".join(sorted(light_threads)) 144 show = ", ".join(sorted(light_threads))
145 raise ConfigError(f"Conflicting concurrency settings: {show}") 145 raise ConfigError(f"Conflicting concurrency settings: {show}")
146 do_threading = False 146 do_threading = False
147 147
148 tried = "nothing" # to satisfy pylint
148 try: 149 try:
149 if "greenlet" in concurrencies: 150 if "greenlet" in concurrencies:
150 tried = "greenlet" 151 tried = "greenlet"
151 import greenlet 152 import greenlet
152 self.concur_id_func = greenlet.getcurrent 153 self.concur_id_func = greenlet.getcurrent
325 # If _start_tracer succeeded, then we add ourselves to the global 326 # If _start_tracer succeeded, then we add ourselves to the global
326 # stack of collectors. 327 # stack of collectors.
327 self._collectors.append(self) 328 self._collectors.append(self)
328 329
329 # Replay all the events from fullcoverage into the new trace function. 330 # Replay all the events from fullcoverage into the new trace function.
330 for args in traces0: 331 for (frame, event, arg), lineno in traces0:
331 (frame, event, arg), lineno = args
332 try: 332 try:
333 fn(frame, event, arg, lineno=lineno) 333 fn(frame, event, arg, lineno=lineno)
334 except TypeError as ex: 334 except TypeError as ex:
335 raise Exception("fullcoverage must be run with the C trace function.") from ex 335 raise Exception("fullcoverage must be run with the C trace function.") from ex
336 336

eric ide

mercurial