Home
last modified time | relevance | path

Searched refs:enter_context (Results 1 – 18 of 18) sorted by relevance

/external/python/cpython3/Lib/test/
Dtest_code_module.py23 self.infunc = stack.enter_context(mock.patch('code.input',
25 self.stdout = stack.enter_context(mock.patch('code.sys.stdout'))
26 self.stderr = stack.enter_context(mock.patch('code.sys.stderr'))
28 self.sysmod = stack.enter_context(prepatch)
Dtest_contextlib.py658 stack.enter_context(cm)
823 stack.enter_context(gets_the_context_right(exc4))
824 stack.enter_context(gets_the_context_right(exc3))
825 stack.enter_context(gets_the_context_right(exc2))
890 self.assertRaises(AttributeError, stack.enter_context, cm)
917 es_ctx.enter_context(second())
918 es_ctx.enter_context(first())
Dtest_readline.py290 cleanup.enter_context(proc)
304 sel = cleanup.enter_context(selectors.SelectSelector())
Dtest_pdb.py1496 resources.enter_context(patch('sys.stdout', stdout))
1497 resources.enter_context(patch.object(pdb.Pdb, 'set_trace'))
Dtest_tracemalloc.py351 stack.enter_context(patch.object(tracemalloc, 'is_tracing',
353 stack.enter_context(patch.object(tracemalloc, 'get_traceback_limit',
355 stack.enter_context(patch.object(tracemalloc, '_get_traces',
Dtest_nntplib.py1586 cleanup.enter_context(client)
1587 reader = cleanup.enter_context(client.makefile('rb'))
1605 cleanup.enter_context(client)
1606 reader = cleanup.enter_context(client.makefile('rb'))
Dtest_builtin.py1761 self.env = self.resources.enter_context(EnvironmentVarGuard())
1763 self.resources.enter_context(
1839 mock = self.resources.enter_context(patch('pdb.set_trace'))
1840 w = self.resources.enter_context(check_warnings(quiet=True))
Dtest_zipfile.py2488 zopen1 = stack.enter_context(zipf.open('ones'))
2489 zopen2 = stack.enter_context(zipf.open('twos'))
2850 tmpdir = pathlib.Path(self.fixtures.enter_context(temp_dir()))
/external/python/cpython3/Lib/test/test_importlib/
Dfixtures.py54 self.site_dir = self.fixtures.enter_context(tempdir())
69 self.fixtures.enter_context(self.add_sys_path(self.site_dir))
175 self.fixtures.enter_context(tempdir_as_cwd())
Dtest_zip.py20 file = self.resources.enter_context(resources.as_file(pkg_file))
/external/python/cpython3/Lib/
Dgetpass.py50 stack.enter_context(tty)
52 stack.enter_context(input)
Dcontextlib.py419 def enter_context(self, cm): member in _BaseExitStack
/external/rust/crates/grpcio-sys/grpc/tools/run_tests/xds_k8s_test_driver/framework/infrastructure/gcp/
Dapi.py143 self._exit_stack.enter_context(api)
153 self._exit_stack.enter_context(api)
159 self._exit_stack.enter_context(api)
/external/python/cpython3/Doc/library/
Dcontextlib.rst364 files = [stack.enter_context(open(fname)) for fname in filenames]
392 .. method:: enter_context(cm)
441 files = [stack.enter_context(open(fname)) for fname in filenames]
468 Similar to :meth:`enter_context` but expects an asynchronous context
514 stack.enter_context(resource)
536 x = stack.enter_context(cm)
/external/tensorflow/tensorflow/python/framework/
Dtest_combinations.py365 context_stack.enter_context(manager)
/external/python/cpython3/Lib/distutils/tests/
Dtest_sysconfig.py103 cm.enter_context(swap_item(sysconfig._config_vars, key, value))
/external/python/cpython3/Lib/test/test_zoneinfo/
Dtest_zoneinfo.py78 stack.enter_context(
1392 stack.enter_context(test_support.set_zoneinfo_module(self.module))
/external/python/cpython3/Lib/unittest/
Dmock.py1316 arg = exit_stack.enter_context(patching)
1508 arg = self._exit_stack.enter_context(patching)