当前位置: 首页>>代码示例>>Python>>正文


Python support.run_doctest方法代码示例

本文整理汇总了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) 
开发者ID:Microvellum,项目名称:Fluid-Designer,代码行数:21,代码来源:test_itertools.py

示例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) 
开发者ID:Microvellum,项目名称:Fluid-Designer,代码行数:27,代码来源:test_deque.py

示例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) 
开发者ID:IronLanguages,项目名称:ironpython3,代码行数:26,代码来源:test_deque.py

示例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) 
开发者ID:IronLanguages,项目名称:ironpython2,代码行数:6,代码来源:test_syntax.py

示例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) 
开发者ID:Microvellum,项目名称:Fluid-Designer,代码行数:16,代码来源:test_genexps.py

示例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. 
开发者ID:Microvellum,项目名称:Fluid-Designer,代码行数:12,代码来源:test_descrtut.py

示例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) 
开发者ID:Microvellum,项目名称:Fluid-Designer,代码行数:6,代码来源:test_unpack.py

示例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) 
开发者ID:Microvellum,项目名称:Fluid-Designer,代码行数:6,代码来源:test_metaclass.py

示例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) 
开发者ID:Microvellum,项目名称:Fluid-Designer,代码行数:15,代码来源:test_collections.py

示例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) 
开发者ID:Microvellum,项目名称:Fluid-Designer,代码行数:8,代码来源:test_doctest.py

示例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) 
开发者ID:Microvellum,项目名称:Fluid-Designer,代码行数:5,代码来源:test_pickletools.py

示例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__]) 
开发者ID:Microvellum,项目名称:Fluid-Designer,代码行数:13,代码来源:test_weakref.py

示例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) 
开发者ID:Microvellum,项目名称:Fluid-Designer,代码行数:17,代码来源:test_setcomps.py

示例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) 
开发者ID:Microvellum,项目名称:Fluid-Designer,代码行数:17,代码来源:test_listcomps.py

示例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) 
开发者ID:Microvellum,项目名称:Fluid-Designer,代码行数:15,代码来源:test_pickle.py


注:本文中的test.support.run_doctest方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。