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


Python tests.run_isolated函数代码示例

本文整理汇总了Python中tests.run_isolated函数的典型用法代码示例。如果您正苦于以下问题:Python run_isolated函数的具体用法?Python run_isolated怎么用?Python run_isolated使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。


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

示例1: test_tpool_size

def test_tpool_size():
    expected = '40'
    normal = '20'
    tests.run_isolated(
        path='env_tpool_size.py',
        env={'EVENTLET_THREADPOOL_SIZE': expected},
        args=[expected, normal],
    )
开发者ID:GorillaKingFJ,项目名称:eventlet,代码行数:8,代码来源:env_test.py

示例2: test_dns_methods_are_green

def test_dns_methods_are_green():
    assert socket.gethostbyname is greendns.gethostbyname
    assert socket.gethostbyname_ex is greendns.gethostbyname_ex
    assert socket.getaddrinfo is greendns.getaddrinfo
    assert socket.getnameinfo is greendns.getnameinfo

    # https://github.com/eventlet/eventlet/pull/341
    # mock older dnspython in system packages
    mock_sys_pkg_dir = tempfile.mkdtemp('eventlet_test_dns_methods_are_green')
    try:
        with open(mock_sys_pkg_dir + '/dns.py', 'wb') as f:
            f.write(b'raise Exception("Your IP address string is so illegal ' +
                    b'it prevents installing packages.")\n')
        tests.run_isolated('socket_resolve_green.py', pythonpath_extend=[mock_sys_pkg_dir])
    finally:
        shutil.rmtree(mock_sys_pkg_dir)
开发者ID:cloudera,项目名称:hue,代码行数:16,代码来源:socket_test.py

示例3: test_threading_join

def test_threading_join():
    tests.run_isolated('patcher_threading_join.py')
开发者ID:eayunstack,项目名称:eventlet,代码行数:2,代码来源:patcher_test.py

示例4: test_importlib_lock

def test_importlib_lock():
    tests.run_isolated('patcher_importlib_lock.py')
开发者ID:eayunstack,项目名称:eventlet,代码行数:2,代码来源:patcher_test.py

示例5: test_threading_condition

def test_threading_condition():
    tests.run_isolated('patcher_threading_condition.py')
开发者ID:eayunstack,项目名称:eventlet,代码行数:2,代码来源:patcher_test.py

示例6: test_threading_current

def test_threading_current():
    tests.run_isolated('patcher_threading_current.py')
开发者ID:eventlet,项目名称:eventlet,代码行数:2,代码来源:patcher_test.py

示例7: test_import_rdtypes_then_eventlet

def test_import_rdtypes_then_eventlet():
    # https://github.com/eventlet/eventlet/issues/479
    tests.run_isolated('greendns_import_rdtypes_then_eventlet.py')
开发者ID:cloudera,项目名称:hue,代码行数:3,代码来源:greendns_test.py

示例8: test_import_patched_handles_sub_modules

def test_import_patched_handles_sub_modules():
    tests.run_isolated('test_sub_module_in_import_patched/test.py')
开发者ID:eventlet,项目名称:eventlet,代码行数:2,代码来源:patcher_test.py

示例9: test_double_close_219

def test_double_close_219():
    tests.run_isolated('greenio_double_close_219.py')
开发者ID:jjohnson42,项目名称:eventlet,代码行数:2,代码来源:greenio_test.py

示例10: test_patcher_existing_locks_early

def test_patcher_existing_locks_early():
    tests.run_isolated('patcher_existing_locks_early.py')
开发者ID:astawiarski,项目名称:eventlet,代码行数:2,代码来源:patcher_test.py

示例11: test_kqueue_unsupported

def test_kqueue_unsupported():
    # https://github.com/eventlet/eventlet/issues/38
    # get_hub on windows broken by kqueue
    tests.run_isolated('hub_kqueue_unsupported.py')
开发者ID:eventlet,项目名称:eventlet,代码行数:4,代码来源:hub_test.py

示例12: test_use_hub_class

def test_use_hub_class():
    tests.run_isolated('hub_use_hub_class.py')
开发者ID:eventlet,项目名称:eventlet,代码行数:2,代码来源:hub_test.py

示例13: test_fork_simple

def test_fork_simple():
    tests.run_isolated('hub_fork_simple.py')
开发者ID:eventlet,项目名称:eventlet,代码行数:2,代码来源:hub_test.py

示例14: test_fork

def test_fork():
    tests.run_isolated('hub_fork.py')
开发者ID:eventlet,项目名称:eventlet,代码行数:2,代码来源:hub_test.py

示例15: test_socketserver_selectors

def test_socketserver_selectors():
    tests.run_isolated('patcher_socketserver_selectors.py')
开发者ID:eayunstack,项目名称:eventlet,代码行数:2,代码来源:patcher_test.py


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