diff options
author | Armin Rigo <arigo@tunes.org> | 2006-05-28 19:13:17 (GMT) |
---|---|---|
committer | Armin Rigo <arigo@tunes.org> | 2006-05-28 19:13:17 (GMT) |
commit | a3f092751ae5f29957c78a7e86381532629c7fa3 (patch) | |
tree | 27eecd5671e5bbe3654c5630a62d1deb7300e80b /Lib/doctest.py | |
parent | e9eeab5c0539ede73b52f9df9bd4da8346c91741 (diff) | |
download | cpython-a3f092751ae5f29957c78a7e86381532629c7fa3.zip cpython-a3f092751ae5f29957c78a7e86381532629c7fa3.tar.gz cpython-a3f092751ae5f29957c78a7e86381532629c7fa3.tar.bz2 |
("Forward-port" of r46506)
Remove various dependencies on dictionary order in the standard library
tests, and one (clearly an oversight, potentially critical) in the
standard library itself - base64.py.
Remaining open issues:
* test_extcall is an output test, messy to make robust
* tarfile.py has a potential bug here, but I'm not familiar
enough with this code. Filed in as SF bug #1496501.
* urllib2.HTTPPasswordMgr() returns a random result if there is more
than one matching root path. I'm asking python-dev for
clarification...
Diffstat (limited to 'Lib/doctest.py')
-rw-r--r-- | Lib/doctest.py | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/Lib/doctest.py b/Lib/doctest.py index 971ec6c..b87df7c 100644 --- a/Lib/doctest.py +++ b/Lib/doctest.py @@ -1056,12 +1056,13 @@ class DocTestRunner: >>> tests = DocTestFinder().find(_TestClass) >>> runner = DocTestRunner(verbose=False) + >>> tests.sort(key = lambda test: test.name) >>> for test in tests: - ... print runner.run(test) - (0, 2) - (0, 1) - (0, 2) - (0, 2) + ... print test.name, '->', runner.run(test) + _TestClass -> (0, 2) + _TestClass.__init__ -> (0, 2) + _TestClass.get -> (0, 2) + _TestClass.square -> (0, 1) The `summarize` method prints a summary of all the test cases that have been run by the runner, and returns an aggregated `(f, t)` |