diff options
author | Tim Peters <tim.peters@gmail.com> | 2001-09-09 06:12:01 (GMT) |
---|---|---|
committer | Tim Peters <tim.peters@gmail.com> | 2001-09-09 06:12:01 (GMT) |
commit | a0a62225094a890c1b07ebc4f89e4c7c45c66b13 (patch) | |
tree | 147057adad1ae5b6548b708753a2febe91080d5f /Lib/test/test_cookie.py | |
parent | 90ba8d9c80c4eba418ca2ddaefbf59c4acf00cf3 (diff) | |
download | cpython-a0a62225094a890c1b07ebc4f89e4c7c45c66b13.zip cpython-a0a62225094a890c1b07ebc4f89e4c7c45c66b13.tar.gz cpython-a0a62225094a890c1b07ebc4f89e4c7c45c66b13.tar.bz2 |
Teach regrtest how to pass on doctest failure msgs. This is done via a
horridly inefficient hack in regrtest's Compare class, but it's about as
clean as can be: regrtest has to set up the Compare instance before
importing a test module, and by the time the module *is* imported it's too
late to change that decision. The good news is that the more tests we
convert to unittest and doctest, the less the inefficiency here matters.
Even now there are few tests with large expected-output files (the new
cost here is a Python-level call per .write() when there's an expected-
output file).
Diffstat (limited to 'Lib/test/test_cookie.py')
-rw-r--r-- | Lib/test/test_cookie.py | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/Lib/test/test_cookie.py b/Lib/test/test_cookie.py index 40c881f..7d452f5 100644 --- a/Lib/test/test_cookie.py +++ b/Lib/test/test_cookie.py @@ -1,9 +1,7 @@ # Simple test suite for Cookie.py -from test_support import verify +from test_support import verify, verbose, run_doctest import Cookie -from test_support import verify, verbose -import doctest # Currently this only tests SimpleCookie @@ -46,4 +44,4 @@ verify(C['Customer']['version'] == '1') verify(C['Customer']['path'] == '/acme') print "If anything blows up after this line, it's from Cookie's doctest." -doctest.testmod(Cookie) +run_doctest(Cookie) |