diff options
Diffstat (limited to 'Lib/doctest.py')
-rw-r--r-- | Lib/doctest.py | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/Lib/doctest.py b/Lib/doctest.py index 47b3aae..fe734b3 100644 --- a/Lib/doctest.py +++ b/Lib/doctest.py @@ -95,7 +95,7 @@ __all__ = [ import __future__ -import sys, traceback, inspect, linecache, os, re, types +import sys, traceback, inspect, linecache, os, re import unittest, difflib, pdb, tempfile import warnings from StringIO import StringIO @@ -821,6 +821,11 @@ class DocTestFinder: # Recursively expore `obj`, extracting DocTests. tests = [] self._find(tests, obj, name, module, source_lines, globs, {}) + # Sort the tests by alpha order of names, for consistency in + # verbose-mode output. This was a feature of doctest in Pythons + # <= 2.3 that got lost by accident in 2.4. It was repaired in + # 2.4.4 and 2.5. + tests.sort() return tests def _from_module(self, module, object): |