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


Python test_support.run_unittest方法代码示例

本文整理汇总了Python中test.test_support.run_unittest方法的典型用法代码示例。如果您正苦于以下问题:Python test_support.run_unittest方法的具体用法?Python test_support.run_unittest怎么用?Python test_support.run_unittest使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在test.test_support的用法示例。


在下文中一共展示了test_support.run_unittest方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。

示例1: test_main

# 需要导入模块: from test import test_support [as 别名]
# 或者: from test.test_support import run_unittest [as 别名]
def test_main():
    tests = [GeneralModuleTests, BasicTCPTest, TCPCloserTest, TCPTimeoutTest,
             TestExceptions, BufferIOTest, BasicTCPTest2, BasicUDPTest,
             UDPTimeoutTest ]

    tests.extend([
        NonBlockingTCPTests,
        FileObjectClassTestCase,
        FileObjectInterruptedTestCase,
        UnbufferedFileObjectClassTestCase,
        LineBufferedFileObjectClassTestCase,
        SmallBufferedFileObjectClassTestCase,
        Urllib2FileobjectTest,
        NetworkConnectionNoServer,
        NetworkConnectionAttributesTest,
        NetworkConnectionBehaviourTest,
    ])
    tests.append(BasicSocketPairTest)
    tests.append(TestLinuxAbstractNamespace)
    tests.extend([TIPCTest, TIPCThreadableTest])

    thread_info = test_support.threading_setup()
    test_support.run_unittest(*tests)
    test_support.threading_cleanup(*thread_info) 
开发者ID:IronLanguages,项目名称:ironpython2,代码行数:26,代码来源:test_socket.py

示例2: test_main

# 需要导入模块: from test import test_support [as 别名]
# 或者: from test.test_support import run_unittest [as 别名]
def test_main(verbose=None):
    test_classes = (
        TestPartial,
        TestPartialSubclass,
        TestPythonPartial,
        TestUpdateWrapper,
        TestTotalOrdering,
        TestWraps,
        TestReduce,
    )
    test_support.run_unittest(*test_classes)

    # verify reference counting
    if verbose and hasattr(sys, "gettotalrefcount"):
        import gc
        counts = [None] * 5
        for i in xrange(len(counts)):
            test_support.run_unittest(*test_classes)
            gc.collect()
            counts[i] = sys.gettotalrefcount()
        print counts 
开发者ID:IronLanguages,项目名称:ironpython2,代码行数:23,代码来源:test_functools.py

示例3: test_main

# 需要导入模块: from test import test_support [as 别名]
# 或者: from test.test_support import run_unittest [as 别名]
def test_main():
    import warnings
    with warnings.catch_warnings():
        warnings.filterwarnings('ignore', ".*urllib\.urlopen.*Python 3.0",
                                DeprecationWarning)
        test_support.run_unittest(
            urlopen_FileTests,
            urlopen_HttpTests,
            urlretrieve_FileTests,
            urlretrieve_HttpTests,
            ProxyTests,
            QuotingTests,
            UnquotingTests,
            urlencode_Tests,
            Pathname_Tests,
            Utility_Tests,
            URLopener_Tests,
            ProxyTests,
            ProxyTests_withOrderedEnv,
            #FTPWrapperTests,
        ) 
开发者ID:IronLanguages,项目名称:ironpython2,代码行数:23,代码来源:test_urllib.py

示例4: test_main

# 需要导入模块: from test import test_support [as 别名]
# 或者: from test.test_support import run_unittest [as 别名]
def test_main():
    support.run_unittest(TestRlcompleter)

    def test_duplicate_globals(self):
        namespace = {
            'False': None,  # Keyword vs builtin vs namespace
            'assert': None,  # Keyword vs namespace
            'try': lambda: None,  # Keyword vs callable
            'memoryview': None,  # Callable builtin vs non-callable
            'Ellipsis': lambda: None,  # Non-callable builtin vs callable
        }
        completer = rlcompleter.Completer(namespace)
        self.assertEqual(completer.complete('False', 0), 'False')
        self.assertIsNone(completer.complete('False', 1))  # No duplicates
        self.assertEqual(completer.complete('assert', 0), 'assert')
        self.assertIsNone(completer.complete('assert', 1))
        self.assertEqual(completer.complete('try', 0), 'try')
        self.assertIsNone(completer.complete('try', 1))
        # No opening bracket "(" because we overrode the built-in class
        self.assertEqual(completer.complete('memoryview', 0), 'memoryview')
        self.assertIsNone(completer.complete('memoryview', 1))
        self.assertEqual(completer.complete('Ellipsis', 0), 'Ellipsis(')
        self.assertIsNone(completer.complete('Ellipsis', 1)) 
开发者ID:IronLanguages,项目名称:ironpython2,代码行数:25,代码来源:test_rlcompleter.py

示例5: test_main

# 需要导入模块: from test import test_support [as 别名]
# 或者: from test.test_support import run_unittest [as 别名]
def test_main():
    test_support.run_unittest(
        cPickleTests,
        cStringIOCUnpicklerTests,
        BytesIOCUnpicklerTests,
        FileIOCUnpicklerTests,
        cStringIOCPicklerTests,
        BytesIOCPicklerTests,
        FileIOCPicklerTests,
        cStringIOCPicklerListTests,
        BytesIOCPicklerListTests,
        FileIOCPicklerListTests,
        cStringIOCPicklerFastTests,
        BytesIOCPicklerFastTests,
        FileIOCPicklerFastTests,
        cPickleDeepRecursive,
        cPicklePicklerUnpicklerObjectTests,
        cPickleBigmemPickleTests,
    ) 
开发者ID:IronLanguages,项目名称:ironpython2,代码行数:21,代码来源:test_cpickle.py

示例6: test_main

# 需要导入模块: from test import test_support [as 别名]
# 或者: from test.test_support import run_unittest [as 别名]
def test_main(verbose=None):
    import sys
    from test import test_support
    test_classes = (TestTranforms,)

    with test_support.check_py3k_warnings(
            ("backquote not supported", SyntaxWarning)):
        test_support.run_unittest(*test_classes)

        # verify reference counting
        if verbose and hasattr(sys, "gettotalrefcount"):
            import gc
            counts = [None] * 5
            for i in xrange(len(counts)):
                test_support.run_unittest(*test_classes)
                gc.collect()
                counts[i] = sys.gettotalrefcount()
            print counts 
开发者ID:IronLanguages,项目名称:ironpython2,代码行数:20,代码来源:test_peepholer.py

示例7: test_main

# 需要导入模块: from test import test_support [as 别名]
# 或者: from test.test_support import run_unittest [as 别名]
def test_main():
    test_support.run_unittest(
        ZoneFileTests
    ) 
开发者ID:blockstack,项目名称:zone-file-py,代码行数:6,代码来源:unit_tests.py

示例8: test_main

# 需要导入模块: from test import test_support [as 别名]
# 或者: from test.test_support import run_unittest [as 别名]
def test_main():
    support.run_unittest(CBufferSizeTest, PyBufferSizeTest, BuiltinBufferSizeTest) 
开发者ID:IronLanguages,项目名称:ironpython2,代码行数:4,代码来源:test_bufio.py

示例9: test_main

# 需要导入模块: from test import test_support [as 别名]
# 或者: from test.test_support import run_unittest [as 别名]
def test_main():
    with test_support.check_py3k_warnings(
            ("tuple parameter unpacking has been removed", SyntaxWarning),
            ("parenthesized argument names are invalid", SyntaxWarning)):
        test_support.run_unittest(ComplexArgsTestCase) 
开发者ID:IronLanguages,项目名称:ironpython2,代码行数:7,代码来源:test_complex_args.py

示例10: test_main

# 需要导入模块: from test import test_support [as 别名]
# 或者: from test.test_support import run_unittest [as 别名]
def test_main():
    with test_support.check_py3k_warnings(("buffer.. not supported",
                                           DeprecationWarning)):
        test_support.run_unittest(BufferTests) 
开发者ID:IronLanguages,项目名称:ironpython2,代码行数:6,代码来源:test_buffer.py

示例11: test_main

# 需要导入模块: from test import test_support [as 别名]
# 或者: from test.test_support import run_unittest [as 别名]
def test_main():
    with test_support.DirsOnSysPath(lib_tk_test):
        test_support.run_unittest(
            *runtktests.get_tests(text=False, packages=['test_ttk'])) 
开发者ID:IronLanguages,项目名称:ironpython2,代码行数:6,代码来源:test_ttk_guionly.py

示例12: test_main

# 需要导入模块: from test import test_support [as 别名]
# 或者: from test.test_support import run_unittest [as 别名]
def test_main():
    test_support.run_unittest(PopenTest) 
开发者ID:IronLanguages,项目名称:ironpython2,代码行数:4,代码来源:test_popen.py

示例13: test_main

# 需要导入模块: from test import test_support [as 别名]
# 或者: from test.test_support import run_unittest [as 别名]
def test_main():
    test_support.run_unittest(FnmatchTestCase, TranslateTestCase, FilterTestCase) 
开发者ID:IronLanguages,项目名称:ironpython2,代码行数:4,代码来源:test_fnmatch.py

示例14: test_main

# 需要导入模块: from test import test_support [as 别名]
# 或者: from test.test_support import run_unittest [as 别名]
def test_main():
    test_support.run_unittest(TestPrint) 
开发者ID:IronLanguages,项目名称:ironpython2,代码行数:4,代码来源:test_print.py

示例15: test_main

# 需要导入模块: from test import test_support [as 别名]
# 或者: from test.test_support import run_unittest [as 别名]
def test_main():
    test_support.run_unittest(NetrcTestCase) 
开发者ID:IronLanguages,项目名称:ironpython2,代码行数:4,代码来源:test_netrc.py


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