From: Benjamin Peterson Date: Tue, 16 Oct 2012 13:51:46 +0000 (-0400) Subject: only run doctests when __doc__ is around X-Git-Tag: v2.7.4rc1~478^2~1 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=bf67ba8f84f3e771193b44b25526d0258826052e;p=thirdparty%2FPython%2Fcpython.git only run doctests when __doc__ is around --- diff --git a/Lib/test/test_cookie.py b/Lib/test/test_cookie.py index 1fb9b7db9feb..816133e49727 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()