本文整理汇总了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],
)
示例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)
示例3: test_threading_join
def test_threading_join():
tests.run_isolated('patcher_threading_join.py')
示例4: test_importlib_lock
def test_importlib_lock():
tests.run_isolated('patcher_importlib_lock.py')
示例5: test_threading_condition
def test_threading_condition():
tests.run_isolated('patcher_threading_condition.py')
示例6: test_threading_current
def test_threading_current():
tests.run_isolated('patcher_threading_current.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')
示例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')
示例9: test_double_close_219
def test_double_close_219():
tests.run_isolated('greenio_double_close_219.py')
示例10: test_patcher_existing_locks_early
def test_patcher_existing_locks_early():
tests.run_isolated('patcher_existing_locks_early.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')
示例12: test_use_hub_class
def test_use_hub_class():
tests.run_isolated('hub_use_hub_class.py')
示例13: test_fork_simple
def test_fork_simple():
tests.run_isolated('hub_fork_simple.py')
示例14: test_fork
def test_fork():
tests.run_isolated('hub_fork.py')
示例15: test_socketserver_selectors
def test_socketserver_selectors():
tests.run_isolated('patcher_socketserver_selectors.py')