Skip to content

Commit

Permalink
Sort members by line-number in verbose output
Browse files Browse the repository at this point in the history
  • Loading branch information
Sanket Agarwal committed Mar 16, 2012
1 parent 34c56bc commit fcab4b6
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions bin/coverage_doctest.py
Original file line number Diff line number Diff line change
Expand Up @@ -331,6 +331,15 @@ def coverage(module_path, verbose=False):
else: score = 0
score = int(score)

# Sort functions/classes by line number
c_md = sorted(c_md, key = lambda x: int(x.split()[1][:-1]))
c_mdt = sorted(c_mdt, key = lambda x: int(x.split()[1][:-1]))
c_idt = sorted(c_idt, key = lambda x: int(x.split()[1][:-1]))

f_md = sorted(f_md, key = lambda x: int(x.split()[1][:-1]))
f_mdt = sorted(f_mdt, key = lambda x: int(x.split()[1][:-1]))
f_idt = sorted(f_idt, key = lambda x: int(x.split()[1][:-1]))

print_coverage(module_path, classes, c_md, c_mdt, c_idt, functions, f_md, f_mdt, f_idt, score, total_doctests, total_members, verbose)


Expand Down

0 comments on commit fcab4b6

Please sign in to comment.