DebugClients/Python/coverage/plugin.py

changeset 5051
3586ebd9fac8
parent 4489
d0d6e4ad31bd
equal deleted inserted replaced
5047:04e5dfbd3f3d 5051:3586ebd9fac8
322 To determine which lines are branches, coverage.py looks for lines that 322 To determine which lines are branches, coverage.py looks for lines that
323 have more than one exit. This function creates a dict mapping each 323 have more than one exit. This function creates a dict mapping each
324 executable line number to a count of how many exits it has. 324 executable line number to a count of how many exits it has.
325 325
326 To be honest, this feels wrong, and should be refactored. Let me know 326 To be honest, this feels wrong, and should be refactored. Let me know
327 if you attempt to implement this... 327 if you attempt to implement this method in your plugin...
328 328
329 """ 329 """
330 return {} 330 return {}
331
332 def missing_arc_description(self, start, end, executed_arcs=None): # pylint: disable=unused-argument
333 """Provide an English sentence describing a missing arc.
334
335 The `start` and `end` arguments are the line numbers of the missing
336 arc. Negative numbers indicate entering or exiting code objects.
337
338 The `executed_arcs` argument is a set of line number pairs, the arcs
339 that were executed in this file.
340
341 By default, this simply returns the string "Line {start} didn't jump
342 to {end}".
343
344 """
345 return "Line {start} didn't jump to line {end}".format(start=start, end=end)
331 346
332 def source_token_lines(self): 347 def source_token_lines(self):
333 """Generate a series of tokenized lines, one for each line in `source`. 348 """Generate a series of tokenized lines, one for each line in `source`.
334 349
335 These tokens are used for syntax-colored reports. 350 These tokens are used for syntax-colored reports.
377 def __gt__(self, other): 392 def __gt__(self, other):
378 return self.filename > other.filename 393 return self.filename > other.filename
379 394
380 def __ge__(self, other): 395 def __ge__(self, other):
381 return self.filename >= other.filename 396 return self.filename >= other.filename
397
398 #
399 # eflag: FileType = Python2

eric ide

mercurial