classes in coverage report are unsorted

Mario Frasca avatarMario Frasca created an issue

the report file python.txt does not follow the same order as automodule / :members:

this is true for the classes (these are keys of a dictionary and dictionaries are per default unsorted). functions and methods within classes are ok.

you could solve this by changing the loop around line 231 of coverage.py.

     op.write('\n')
 if undoc['classes']:
     op.write('Classes:\n')
-    for name, methods in undoc['classes'].iteritems():
+    for name, methods in sorted(undoc['classes'].items()):
         if not methods:
             op.write(' * %s\n' % name)
         else:
Tip: Filter by directory path e.g. /media app.js to search for public/media/app.js.
Tip: Use camelCasing e.g. ProjME to search for ProjectModifiedEvent.java.
Tip: Filter by extension type e.g. /repo .js to search for all .js files in the /repo directory.
Tip: Separate your search with spaces e.g. /ssh pom.xml to search for src/ssh/pom.xml.
Tip: Use ↑ and ↓ arrow keys to navigate and return to view the file.
Tip: You can also navigate files with Ctrl+j (next) and Ctrl+k (previous) and view the file with Ctrl+o.
Tip: You can also navigate files with Alt+j (next) and Alt+k (previous) and view the file with Alt+o.