• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    迪恩网络公众号

Python tests.run_isolated函数代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

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



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


示例16: test_tpool_negative

def test_tpool_negative():
    tests.run_isolated('env_tpool_negative.py', env={'EVENTLET_THREADPOOL_SIZE': '-1'})
开发者ID:GorillaKingFJ,项目名称:eventlet,代码行数:2,代码来源:env_test.py


示例17: test_blocking_select_methods_are_deleted

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


示例18: test_patched_communicate_290

def test_patched_communicate_290():
    # https://github.com/eventlet/eventlet/issues/290
    # Certain order of import and monkey_patch breaks subprocess communicate()
    # with AttributeError module `select` has no `poll` on Linux
    # unpatched methods are removed for safety reasons in commit f63165c0e3
    tests.run_isolated('subprocess_patched_communicate.py')
开发者ID:cloudera,项目名称:hue,代码行数:6,代码来源:subprocess_test.py


示例19: test_patcher_existing_locks_locked

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


示例20: test_import_patched_defaults

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



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


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
Python tests.run_test函数代码示例发布时间:2022-05-27
下一篇:
Python tests.reset_all_users函数代码示例发布时间:2022-05-27
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap