mirror of
https://github.com/python/cpython.git
synced 2025-11-02 03:01:58 +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():
|
||||
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()
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue