mirror of
https://github.com/python/cpython.git
synced 2025-11-03 03:22:27 +00:00
only run doctests when __doc__ is around
This commit is contained in:
parent
ae1d185750
commit
bf67ba8f84
1 changed files with 4 additions and 3 deletions
|
|
@ -90,9 +90,10 @@ class CookieTests(unittest.TestCase):
|
||||||
|
|
||||||
def test_main():
|
def test_main():
|
||||||
run_unittest(CookieTests)
|
run_unittest(CookieTests)
|
||||||
with check_warnings(('.+Cookie class is insecure; do not use it',
|
if Cookie.__doc__ is not None:
|
||||||
DeprecationWarning)):
|
with check_warnings(('.+Cookie class is insecure; do not use it',
|
||||||
run_doctest(Cookie)
|
DeprecationWarning)):
|
||||||
|
run_doctest(Cookie)
|
||||||
|
|
||||||
if __name__ == '__main__':
|
if __name__ == '__main__':
|
||||||
test_main()
|
test_main()
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue