Home
last modified time | relevance | path

Searched refs:swap_attr (Results 1 – 25 of 37) sorted by relevance

12

/third_party/python/Lib/test/
Dtest_dynamic.py6 from test.support import swap_item, swap_attr
45 with swap_attr(builtins, "len", lambda x: 7):
58 with swap_attr(builtins, "len", lambda x: 7):
64 with swap_attr(builtins, "len", len):
Dtest_support.py92 with support.swap_attr(support, 'verbose', 0):
98 with support.swap_attr(support, 'verbose', 0):
105 with support.swap_attr(support, 'verbose', 0):
363 with support.swap_attr(obj, "x", 5) as x:
367 with support.swap_attr(obj, "y", 5) as y:
371 with support.swap_attr(obj, "y", 5):
565 with support.swap_attr(support, '_match_test_func', None):
612 with support.swap_attr(support, '_match_test_func', None):
Dtest_linecache.py231 with support.swap_attr(linecache, 'updatecache', raise_memoryerror):
236 with support.swap_attr(linecache, 'updatecache', raise_memoryerror):
Dtest_sys.py68 with support.swap_attr(sys, 'displayhook', baddisplayhook):
1026 with test.support.swap_attr(sys, 'unraisablehook',
1060 test.support.swap_attr(sys, 'unraisablehook',
1085 test.support.swap_attr(sys, 'unraisablehook',
1095 with test.support.swap_attr(sys, 'unraisablehook',
1109 with test.support.swap_attr(sys, 'unraisablehook', hook_func):
1126 with test.support.swap_attr(sys, 'unraisablehook', hook_func):
Dtest_strptime.py400 with support.swap_attr(time, 'tzname', (tz_name, tz_name)), \
401 support.swap_attr(time, 'daylight', 1), \
402 support.swap_attr(time, 'tzset', lambda: None):
Dtest_netrc.py156 with support.swap_attr(os.path, 'expanduser', fake_expanduser):
Dtest_tempfile.py284 with support.swap_attr(tempfile, "_candidate_tempdir_list",
293 with support.swap_attr(io, "open", raise_OSError):
304 with support.swap_attr(io, "open", bad_writer) as orig_open:
331 with support.swap_attr(tempfile, 'tempdir', dir):
338 return support.swap_attr(tempfile,
362 with support.swap_attr(tempfile, 'tempdir', tempdir):
370 with support.swap_attr(tempfile, 'tempdir', tempdir):
Dtest_threading.py1475 with support.swap_attr(threading, 'excepthook', hook):
1498 with support.swap_attr(threading, 'excepthook', threading_hook), \
1499 support.swap_attr(sys, 'excepthook', sys_hook), \
1521 with support.swap_attr(threading, 'excepthook', threading_hook):
Dtest_shutil.py1833 support.swap_attr(os, 'defpath', self.dir), \
1851 support.swap_attr(os, 'defpath', self.dir):
1867 support.swap_attr(os, 'defpath', self.dir):
1874 support.swap_attr(os, 'defpath', ''):
2205 with support.swap_attr(shutil, 'open', _open):
2220 with support.swap_attr(shutil, 'open', _open):
2239 with support.swap_attr(shutil, 'open', _open):
2261 with support.swap_attr(shutil, 'open', _open):
2636 with support.swap_attr(sys, '__stdout__', None):
2644 support.swap_attr(sys, '__stdout__', f):
Dtest_fileio.py12 from test.support import cpython_only, swap_attr, gc_collect
183 with swap_attr(self.f, 'name', self.f):
Dtest_traceback.py906 with support.swap_attr(sys, 'tracebacklimit', 1000):
933 with support.swap_attr(sys, 'tracebacklimit', 1000):
962 with support.swap_attr(sys, 'tracebacklimit', 1000):
Dtest_poplib.py332 with test_support.swap_attr(self.client, 'welcome', evil_welcome):
Dtest_site.py328 support.swap_attr(site, 'ENABLE_USER_SITE', True):
Dtest_wsgiref.py568 with support.swap_attr(TestHandler, 'os_environ', os_environ):
Dtest_tarfile.py241 with support.swap_attr(sys, 'stdout', tio):
278 with support.swap_attr(sys, 'stdout', tio):
306 with support.swap_attr(sys, 'stdout', tio):
/third_party/python/Lib/distutils/tests/
Dtest_log.py6 from test.support import swap_attr, run_unittest
24 with swap_attr(sys, 'stdout', stdout), \
25 swap_attr(sys, 'stderr', stderr):
/third_party/python/Lib/tkinter/test/test_tkinter/
Dtest_simpledialog.py3 from test.support import requires, swap_attr
19 with swap_attr(Dialog, 'wait_window', mock_wait_window):
Dtest_messagebox.py3 from test.support import requires, swap_attr
20 with swap_attr(Dialog, '_test_callback', test_callback):
Dtest_colorchooser.py3 from test.support import requires, swap_attr
51 with swap_attr(Dialog, '_test_callback', test_callback):
/third_party/python/Lib/test/test_tools/
Dtest_fixcid.py85 with support.swap_attr(sys, "argv", argv), \
86 support.swap_attr(sys, "stdin", StringIO(input)), \
/third_party/python/Lib/test/test_warnings/
D__init__.py835 with support.swap_attr(wmod, 'onceregistry', None):
850 with support.swap_attr(wmod, 'defaultaction', None), \
923 with support.swap_attr(self.module, 'formatwarning', myformatwarning):
1064 with support.swap_attr(wmod, 'showwarning', my_logger):
/third_party/python/Lib/idlelib/idle_test/
Dtest_sidebar.py8 from test.support import requires, swap_attr
620 swap_attr(self.shell, 'squeezer', None):
/third_party/python/Lib/test/test_import/
D__init__.py22 from test.support import (is_jython, swap_attr, swap_item, cpython_only)
432 with swap_attr(os, '__name__', None):
825 with swap_attr(builtins, "__import__", lambda *x: 5):
/third_party/python/Lib/test/test_importlib/
Dtest_util.py574 with support.swap_attr(sys.implementation, 'cache_tag', None):
704 with support.swap_attr(sys.implementation, 'cache_tag', None):
/third_party/python/Misc/NEWS.d/
D3.6.2rc1.rst916 Enhanced functions swap_attr() and swap_item() in the test.support module.

12