mirror of
https://github.com/python/cpython.git
synced 2025-08-27 12:16:04 +00:00
Issue #19535: Fixed test_docxmlrpc, test_functools, test_inspect, and
test_statistics when python is run with -OO.
This commit is contained in:
commit
b12cb6a550
5 changed files with 14 additions and 4 deletions
|
@ -8,6 +8,7 @@ import decimal
|
|||
import doctest
|
||||
import math
|
||||
import random
|
||||
import sys
|
||||
import types
|
||||
import unittest
|
||||
|
||||
|
@ -625,6 +626,8 @@ class GlobalsTest(unittest.TestCase):
|
|||
|
||||
|
||||
class DocTests(unittest.TestCase):
|
||||
@unittest.skipIf(sys.flags.optimize >= 2,
|
||||
"Docstrings are omitted with -OO and above")
|
||||
def test_doc_tests(self):
|
||||
failed, tried = doctest.testmod(statistics)
|
||||
self.assertGreater(tried, 0)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue