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


Python support.threading_cleanup方法代码示例

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


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

示例1: setUp

# 需要导入模块: from test import support [as 别名]
# 或者: from test.support import threading_cleanup [as 别名]
def setUp(self):
        self.done_mutex = thread.allocate_lock()
        self.done_mutex.acquire()
        self.running_mutex = thread.allocate_lock()
        self.random_mutex = thread.allocate_lock()
        self.created = 0
        self.running = 0
        self.next_ident = 0

        key = support.threading_setup()
        self.addCleanup(support.threading_cleanup, *key) 
开发者ID:IronLanguages,项目名称:ironpython2,代码行数:13,代码来源:test_thread.py

示例2: tearDown

# 需要导入模块: from test import support [as 别名]
# 或者: from test.support import threading_cleanup [as 别名]
def tearDown(self):
        # Stop threads
        self.stop = 1
        for thread in self.threads:
            thread.join()
        thread = None
        del self.threads[:]
        support.threading_cleanup(*self._threading_key) 
开发者ID:IronLanguages,项目名称:ironpython2,代码行数:10,代码来源:fork_wait.py

示例3: test_main

# 需要导入模块: from test import support [as 别名]
# 或者: from test.support import threading_cleanup [as 别名]
def test_main():
    tests = [TestFTPClass, TestTimeouts,
             TestIPv6Environment,
             TestTLS_FTPClassMixin, TestTLS_FTPClass]

    thread_info = support.threading_setup()
    try:
        support.run_unittest(*tests)
    finally:
        support.threading_cleanup(*thread_info) 
开发者ID:Microvellum,项目名称:Fluid-Designer,代码行数:12,代码来源:test_ftplib.py

示例4: tearDownModule

# 需要导入模块: from test import support [as 别名]
# 或者: from test.support import threading_cleanup [as 别名]
def tearDownModule():
    if threads_key:
        support.threading_cleanup(threads_key) 
开发者ID:Microvellum,项目名称:Fluid-Designer,代码行数:5,代码来源:test_urllib2_localnet.py

示例5: tearDown

# 需要导入模块: from test import support [as 别名]
# 或者: from test.support import threading_cleanup [as 别名]
def tearDown(self):
        support.threading_cleanup(*self._threads)
        support.reap_children() 
开发者ID:Microvellum,项目名称:Fluid-Designer,代码行数:5,代码来源:lock_tests.py

示例6: test_main

# 需要导入模块: from test import support [as 别名]
# 或者: from test.support import threading_cleanup [as 别名]
def test_main():
    tests = [TestPOP3Class, TestTimeouts,
             TestPOP3_SSLClass, TestPOP3_TLSClass]
    thread_info = test_support.threading_setup()
    try:
        test_support.run_unittest(*tests)
    finally:
        test_support.threading_cleanup(*thread_info) 
开发者ID:Microvellum,项目名称:Fluid-Designer,代码行数:10,代码来源:test_poplib.py

示例7: tearDownClass

# 需要导入模块: from test import support [as 别名]
# 或者: from test.support import threading_cleanup [as 别名]
def tearDownClass(cls):
        support.threading_cleanup(*cls.key)
        support.unlink(support.TESTFN) 
开发者ID:Microvellum,项目名称:Fluid-Designer,代码行数:5,代码来源:test_os.py

示例8: tearDown

# 需要导入模块: from test import support [as 别名]
# 或者: from test.support import threading_cleanup [as 别名]
def tearDown(self):
        self.client.close()

        self.evt.wait()

        # Disable server feedback
        DocXMLRPCServer._send_traceback_header = False
        support.threading_cleanup(*self._threads) 
开发者ID:Microvellum,项目名称:Fluid-Designer,代码行数:10,代码来源:test_docxmlrpc.py

示例9: tearDown

# 需要导入模块: from test import support [as 别名]
# 或者: from test.support import threading_cleanup [as 别名]
def tearDown(self):
        support.threading_cleanup(*self._threads) 
开发者ID:Microvellum,项目名称:Fluid-Designer,代码行数:4,代码来源:test_asynchat.py

示例10: tearDown

# 需要导入模块: from test import support [as 别名]
# 或者: from test.support import threading_cleanup [as 别名]
def tearDown(self):
        self.unpatch_get_running_loop()

        events.set_event_loop(None)

        # Detect CPython bug #23353: ensure that yield/yield-from is not used
        # in an except block of a generator
        self.assertEqual(sys.exc_info(), (None, None, None))

        self.doCleanups()
        support.threading_cleanup(*self._thread_cleanup)
        support.reap_children() 
开发者ID:crossbario,项目名称:txaio,代码行数:14,代码来源:_asyncio_test_utils.py

示例11: test_main

# 需要导入模块: from test import support [as 别名]
# 或者: from test.support import threading_cleanup [as 别名]
def test_main():
    tests = [TestFTPClass, TestTimeouts, TestNetrcDeprecation,
             TestIPv6Environment,
             TestTLS_FTPClassMixin, TestTLS_FTPClass]

    thread_info = support.threading_setup()
    try:
        support.run_unittest(*tests)
    finally:
        support.threading_cleanup(*thread_info) 
开发者ID:IronLanguages,项目名称:ironpython3,代码行数:12,代码来源:test_ftplib.py

示例12: tearDown

# 需要导入模块: from test import support [as 别名]
# 或者: from test.support import threading_cleanup [as 别名]
def tearDown(self):
        self.thread.stop()
        self.thread = None
        os.environ.__exit__()
        support.threading_cleanup(*self._threads) 
开发者ID:ShikyoKira,项目名称:Project-New-Reign---Nemesis-Main,代码行数:7,代码来源:test_httpservers.py

示例13: test_main

# 需要导入模块: from test import support [as 别名]
# 或者: from test.support import threading_cleanup [as 别名]
def test_main():
    tests = [TestFTPClass, TestTimeouts,
             TestIPv6Environment,
             TestTLS_FTPClassMixin, TestTLS_FTPClass,
             MiscTestCase]

    thread_info = support.threading_setup()
    try:
        support.run_unittest(*tests)
    finally:
        support.threading_cleanup(*thread_info) 
开发者ID:bkerler,项目名称:android_universal,代码行数:13,代码来源:test_ftplib.py

示例14: tearDownModule

# 需要导入模块: from test import support [as 别名]
# 或者: from test.support import threading_cleanup [as 别名]
def tearDownModule():
    if threads_key:
        support.threading_cleanup(*threads_key) 
开发者ID:bkerler,项目名称:android_universal,代码行数:5,代码来源:test_urllib2_localnet.py

示例15: test_main

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

    tests.extend([
        NonBlockingTCPTests,
        FileObjectClassTestCase,
        UnbufferedFileObjectClassTestCase,
        LineBufferedFileObjectClassTestCase,
        SmallBufferedFileObjectClassTestCase,
        UnicodeReadFileObjectClassTestCase,
        UnicodeWriteFileObjectClassTestCase,
        UnicodeReadWriteFileObjectClassTestCase,
        NetworkConnectionNoServer,
        NetworkConnectionAttributesTest,
        NetworkConnectionBehaviourTest,
        ContextManagersTest,
        InheritanceTest,
        NonblockConstantTest
    ])
    tests.append(BasicSocketPairTest)
    tests.append(TestUnixDomain)
    tests.append(TestLinuxAbstractNamespace)
    tests.extend([TIPCTest, TIPCThreadableTest])
    tests.extend([BasicCANTest, CANTest])
    tests.extend([BasicRDSTest, RDSTest])
    tests.extend([
        CmsgMacroTests,
        SendmsgUDPTest,
        RecvmsgUDPTest,
        RecvmsgIntoUDPTest,
        SendmsgUDP6Test,
        RecvmsgUDP6Test,
        RecvmsgRFC3542AncillaryUDP6Test,
        RecvmsgIntoRFC3542AncillaryUDP6Test,
        RecvmsgIntoUDP6Test,
        SendmsgTCPTest,
        RecvmsgTCPTest,
        RecvmsgIntoTCPTest,
        SendmsgSCTPStreamTest,
        RecvmsgSCTPStreamTest,
        RecvmsgIntoSCTPStreamTest,
        SendmsgUnixStreamTest,
        RecvmsgUnixStreamTest,
        RecvmsgIntoUnixStreamTest,
        RecvmsgSCMRightsStreamTest,
        RecvmsgIntoSCMRightsStreamTest,
        # These are slow when setitimer() is not available
        InterruptedRecvTimeoutTest,
        InterruptedSendTimeoutTest,
        TestSocketSharing,
        SendfileUsingSendTest,
        SendfileUsingSendfileTest,
    ])

    thread_info = support.threading_setup()
    support.run_unittest(*tests)
    support.threading_cleanup(*thread_info) 
开发者ID:Microvellum,项目名称:Fluid-Designer,代码行数:60,代码来源:test_socket.py


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