Searched refs:enter_context (Results 1 – 18 of 18) sorted by relevance
23 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)
658 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())
290 cleanup.enter_context(proc)304 sel = cleanup.enter_context(selectors.SelectSelector())
1496 resources.enter_context(patch('sys.stdout', stdout))1497 resources.enter_context(patch.object(pdb.Pdb, 'set_trace'))
351 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',
1586 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'))
1761 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))
2488 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()))
54 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())
20 file = self.resources.enter_context(resources.as_file(pkg_file))
50 stack.enter_context(tty)52 stack.enter_context(input)
419 def enter_context(self, cm): member in _BaseExitStack
143 self._exit_stack.enter_context(api)153 self._exit_stack.enter_context(api)159 self._exit_stack.enter_context(api)
364 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 context514 stack.enter_context(resource)536 x = stack.enter_context(cm)
365 context_stack.enter_context(manager)
103 cm.enter_context(swap_item(sysconfig._config_vars, key, value))
78 stack.enter_context(1392 stack.enter_context(test_support.set_zoneinfo_module(self.module))
1316 arg = exit_stack.enter_context(patching)1508 arg = self._exit_stack.enter_context(patching)