diff options
| author | Benjamin Peterson <benjamin@python.org> | 2012-10-16 13:51:46 (GMT) |
|---|---|---|
| committer | Benjamin Peterson <benjamin@python.org> | 2012-10-16 13:51:46 (GMT) |
| commit | bf67ba8f84f3e771193b44b25526d0258826052e (patch) | |
| tree | 1810d722c6c00f0c0638d0fb42e7934bff87d430 /Lib/test/test_cookie.py | |
| parent | ae1d185750af0659154def9b428749ccdf03f782 (diff) | |
| download | cpython-bf67ba8f84f3e771193b44b25526d0258826052e.zip cpython-bf67ba8f84f3e771193b44b25526d0258826052e.tar.gz cpython-bf67ba8f84f3e771193b44b25526d0258826052e.tar.bz2 | |
only run doctests when __doc__ is around
Diffstat (limited to 'Lib/test/test_cookie.py')
| -rw-r--r-- | Lib/test/test_cookie.py | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/Lib/test/test_cookie.py b/Lib/test/test_cookie.py index 1fb9b7d..816133e 100644 --- a/Lib/test/test_cookie.py +++ b/Lib/test/test_cookie.py @@ -90,9 +90,10 @@ class CookieTests(unittest.TestCase): def test_main(): run_unittest(CookieTests) - with check_warnings(('.+Cookie class is insecure; do not use it', - DeprecationWarning)): - run_doctest(Cookie) + if Cookie.__doc__ is not None: + with check_warnings(('.+Cookie class is insecure; do not use it', + DeprecationWarning)): + run_doctest(Cookie) if __name__ == '__main__': test_main() |
