本文整理汇总了Python中test.support.run_doctest方法的典型用法代码示例。如果您正苦于以下问题:Python support.run_doctest方法的具体用法?Python support.run_doctest怎么用?Python support.run_doctest使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类test.support
的用法示例。
在下文中一共展示了support.run_doctest方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: test_main
# 需要导入模块: from test import support [as 别名]
# 或者: from test.support import run_doctest [as 别名]
def test_main(verbose=None):
test_classes = (TestBasicOps, TestVariousIteratorArgs, TestGC,
RegressionTests, LengthTransparency,
SubclassWithKwargsTest, TestExamples,
SizeofTest)
support.run_unittest(*test_classes)
# verify reference counting
if verbose and hasattr(sys, "gettotalrefcount"):
import gc
counts = [None] * 5
for i in range(len(counts)):
support.run_unittest(*test_classes)
gc.collect()
counts[i] = sys.gettotalrefcount()
print(counts)
# doctest the examples in the library reference
support.run_doctest(sys.modules[__name__], verbose)
示例2: test_main
# 需要导入模块: from test import support [as 别名]
# 或者: from test.support import run_doctest [as 别名]
def test_main(verbose=None):
import sys
test_classes = (
TestBasic,
TestVariousIteratorArgs,
TestSubclass,
TestSubclassWithKwargs,
TestSequence,
)
support.run_unittest(*test_classes)
# verify reference counting
if verbose and hasattr(sys, "gettotalrefcount"):
import gc
counts = [None] * 5
for i in range(len(counts)):
support.run_unittest(*test_classes)
gc.collect()
counts[i] = sys.gettotalrefcount()
print(counts)
# doctests
from test import test_deque
support.run_doctest(test_deque, verbose)
示例3: test_main
# 需要导入模块: from test import support [as 别名]
# 或者: from test.support import run_doctest [as 别名]
def test_main(verbose=None):
import sys
test_classes = (
TestBasic,
TestVariousIteratorArgs,
TestSubclass,
TestSubclassWithKwargs,
)
support.run_unittest(*test_classes)
# verify reference counting
if verbose and hasattr(sys, "gettotalrefcount"):
import gc
counts = [None] * 5
for i in range(len(counts)):
support.run_unittest(*test_classes)
gc.collect()
counts[i] = sys.gettotalrefcount()
print(counts)
# doctests
from test import test_deque
support.run_doctest(test_deque, verbose)
示例4: test_main
# 需要导入模块: from test import support [as 别名]
# 或者: from test.support import run_doctest [as 别名]
def test_main():
support.run_unittest(SyntaxTestCase)
from test import test_syntax
support.run_doctest(test_syntax, verbosity=True)
示例5: test_main
# 需要导入模块: from test import support [as 别名]
# 或者: from test.support import run_doctest [as 别名]
def test_main(verbose=None):
from test import support
from test import test_genexps
support.run_doctest(test_genexps, verbose)
# verify reference counting
if verbose and hasattr(sys, "gettotalrefcount"):
import gc
counts = [None] * 5
for i in range(len(counts)):
support.run_doctest(test_genexps, verbose)
gc.collect()
counts[i] = sys.gettotalrefcount()
print(counts)
示例6: test_main
# 需要导入模块: from test import support [as 别名]
# 或者: from test.support import run_doctest [as 别名]
def test_main(verbose=None):
# Obscure: import this module as test.test_descrtut instead of as
# plain test_descrtut because the name of this module works its way
# into the doctest examples, and unless the full test.test_descrtut
# business is used the name can change depending on how the test is
# invoked.
from test import support, test_descrtut
support.run_doctest(test_descrtut, verbose)
# This part isn't needed for regrtest, but for running the test directly.
示例7: test_main
# 需要导入模块: from test import support [as 别名]
# 或者: from test.support import run_doctest [as 别名]
def test_main(verbose=False):
from test import support
from test import test_unpack
support.run_doctest(test_unpack, verbose)
示例8: test_main
# 需要导入模块: from test import support [as 别名]
# 或者: from test.support import run_doctest [as 别名]
def test_main(verbose=False):
from test import support
from test import test_metaclass
support.run_doctest(test_metaclass, verbose)
示例9: test_main
# 需要导入模块: from test import support [as 别名]
# 或者: from test.support import run_doctest [as 别名]
def test_main(verbose=None):
NamedTupleDocs = doctest.DocTestSuite(module=collections)
test_classes = [TestNamedTuple, NamedTupleDocs, TestOneTrickPonyABCs,
TestCollectionABCs, TestCounter, TestChainMap,
PurePythonOrderedDictTests, CPythonOrderedDictTests,
PurePythonOrderedDictSubclassTests,
CPythonOrderedDictSubclassTests,
PurePythonGeneralMappingTests, CPythonGeneralMappingTests,
PurePythonSubclassMappingTests, CPythonSubclassMappingTests,
TestUserObjects,
]
support.run_unittest(*test_classes)
support.run_doctest(collections, verbose)
示例10: test_main
# 需要导入模块: from test import support [as 别名]
# 或者: from test.support import run_doctest [as 别名]
def test_main():
# Check the doctest cases in doctest itself:
ret = support.run_doctest(doctest, verbosity=True)
# Check the doctest cases defined here:
from test import test_doctest
support.run_doctest(test_doctest, verbosity=True)
示例11: test_main
# 需要导入模块: from test import support [as 别名]
# 或者: from test.support import run_doctest [as 别名]
def test_main():
support.run_unittest(OptimizedPickleTests)
support.run_doctest(pickletools)
示例12: test_main
# 需要导入模块: from test import support [as 别名]
# 或者: from test.support import run_doctest [as 别名]
def test_main():
support.run_unittest(
ReferencesTestCase,
WeakMethodTestCase,
MappingTestCase,
WeakValueDictionaryTestCase,
WeakKeyDictionaryTestCase,
SubclassableWeakrefTestCase,
FinalizeTestCase,
)
support.run_doctest(sys.modules[__name__])
示例13: test_main
# 需要导入模块: from test import support [as 别名]
# 或者: from test.support import run_doctest [as 别名]
def test_main(verbose=None):
import sys
from test import support
from test import test_setcomps
support.run_doctest(test_setcomps, verbose)
# verify reference counting
if verbose and hasattr(sys, "gettotalrefcount"):
import gc
counts = [None] * 5
for i in range(len(counts)):
support.run_doctest(test_setcomps, verbose)
gc.collect()
counts[i] = sys.gettotalrefcount()
print(counts)
示例14: test_main
# 需要导入模块: from test import support [as 别名]
# 或者: from test.support import run_doctest [as 别名]
def test_main(verbose=None):
import sys
from test import support
from test import test_listcomps
support.run_doctest(test_listcomps, verbose)
# verify reference counting
if verbose and hasattr(sys, "gettotalrefcount"):
import gc
counts = [None] * 5
for i in range(len(counts)):
support.run_doctest(test_genexps, verbose)
gc.collect()
counts[i] = sys.gettotalrefcount()
print(counts)
示例15: test_main
# 需要导入模块: from test import support [as 别名]
# 或者: from test.support import run_doctest [as 别名]
def test_main():
tests = [PickleTests, PyUnpicklerTests, PyPicklerTests, PyPersPicklerTests,
PyDispatchTableTests, PyChainDispatchTableTests,
CompatPickleTests]
if has_c_implementation:
tests.extend([CUnpicklerTests, CPicklerTests, CPersPicklerTests,
CDumpPickle_LoadPickle, DumpPickle_CLoadPickle,
PyPicklerUnpicklerObjectTests,
CPicklerUnpicklerObjectTests,
CDispatchTableTests, CChainDispatchTableTests,
InMemoryPickleTests, SizeofTests])
support.run_unittest(*tests)
support.run_doctest(pickle)