[Python-checkins] cpython (2.7): only run doctests when __doc__ is around
benjamin.peterson
python-checkins at python.org
Tue Oct 16 15:52:06 CEST 2012
http://hg.python.org/cpython/rev/a7d8c28280c0
changeset: 79756:a7d8c28280c0
branch: 2.7
parent: 79738:c1f27cf0cc9d
user: Benjamin Peterson <benjamin at python.org>
date: Tue Oct 16 09:51:46 2012 -0400
summary:
only run doctests when __doc__ is around
files:
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
--- a/Lib/test/test_cookie.py
+++ b/Lib/test/test_cookie.py
@@ -90,9 +90,10 @@
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()
--
Repository URL: http://hg.python.org/cpython
More information about the Python-checkins
mailing list