Issue #19535: Fixed test_docxmlrpc, test_functools, test_inspect, and

test_statistics when python is run with -OO.
This commit is contained in:
Serhiy Storchaka 2013-12-08 18:16:18 +02:00
commit b12cb6a550
5 changed files with 14 additions and 4 deletions

View file

@ -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)