/external/python/cpython3/Lib/distutils/tests/ |
D | test_log.py | 6 from test.support import swap_attr, run_unittest 24 with swap_attr(sys, 'stdout', stdout), \ 25 swap_attr(sys, 'stderr', stderr):
|
/external/python/cpython3/Lib/test/ |
D | test_dynamic.py | 6 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):
|
D | test_support.py | 59 with support.swap_attr(support, 'verbose', 0): 65 with support.swap_attr(support, 'verbose', 0): 72 with support.swap_attr(support, 'verbose', 0): 329 with support.swap_attr(obj, "x", 5) as x: 333 with support.swap_attr(obj, "y", 5) as y: 337 with support.swap_attr(obj, "y", 5): 531 with support.swap_attr(support, '_match_test_func', None): 578 with support.swap_attr(support, '_match_test_func', None):
|
D | test_linecache.py | 230 with support.swap_attr(linecache, 'updatecache', raise_memoryerror): 235 with support.swap_attr(linecache, 'updatecache', raise_memoryerror):
|
D | test_tempfile.py | 263 with support.swap_attr(tempfile, "_candidate_tempdir_list", 272 with support.swap_attr(io, "open", raise_OSError): 283 with support.swap_attr(io, "open", bad_writer) as orig_open: 310 with support.swap_attr(tempfile, 'tempdir', dir): 317 return support.swap_attr(tempfile, 341 with support.swap_attr(tempfile, 'tempdir', tempdir): 349 with support.swap_attr(tempfile, 'tempdir', tempdir):
|
D | test_netrc.py | 161 with support.swap_attr(os.path, 'expanduser', fake_expanduser):
|
D | test_sys.py | 66 with support.swap_attr(sys, 'displayhook', baddisplayhook): 956 with test.support.swap_attr(sys, 'unraisablehook', 990 test.support.swap_attr(sys, 'unraisablehook', 1011 with test.support.swap_attr(sys, 'unraisablehook', 1025 with test.support.swap_attr(sys, 'unraisablehook', hook_func): 1042 with test.support.swap_attr(sys, 'unraisablehook', hook_func):
|
D | test_strptime.py | 400 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):
|
D | test_threading.py | 1299 with support.swap_attr(threading, 'excepthook', hook): 1322 with support.swap_attr(threading, 'excepthook', threading_hook), \ 1323 support.swap_attr(sys, 'excepthook', sys_hook), \
|
D | test_shutil.py | 1775 support.swap_attr(os, 'defpath', self.dir), \ 1793 support.swap_attr(os, 'defpath', self.dir): 1809 support.swap_attr(os, 'defpath', self.dir): 1816 support.swap_attr(os, 'defpath', ''): 2112 with support.swap_attr(shutil, 'open', _open): 2127 with support.swap_attr(shutil, 'open', _open): 2146 with support.swap_attr(shutil, 'open', _open): 2168 with support.swap_attr(shutil, 'open', _open): 2543 with support.swap_attr(sys, '__stdout__', None): 2551 support.swap_attr(sys, '__stdout__', f):
|
D | test_fileio.py | 13 make_bad_fd, cpython_only, swap_attr) 181 with swap_attr(self.f, 'name', self.f):
|
D | test_traceback.py | 775 with support.swap_attr(sys, 'tracebacklimit', 1000): 802 with support.swap_attr(sys, 'tracebacklimit', 1000): 831 with support.swap_attr(sys, 'tracebacklimit', 1000):
|
D | test_mimetypes.py | 78 … with support.swap_attr(_bootlocale, 'getpreferredencoding', lambda do_setlocale=True: 'ASCII'):
|
/external/python/cpython2/Lib/test/ |
D | test_test_support.py | 72 with support.swap_attr(support, 'verbose', 0): 78 with support.swap_attr(support, 'verbose', 0): 85 with support.swap_attr(support, 'verbose', 0): 337 with support.swap_attr(obj, "x", 5) as x: 341 with support.swap_attr(obj, "y", 5) as y: 345 with support.swap_attr(obj, "y", 5): 374 with support.swap_attr(support, '_match_test_func', None):
|
D | test_linecache.py | 132 with support.swap_attr(linecache, 'updatecache', raise_memoryerror): 137 with support.swap_attr(linecache, 'updatecache', raise_memoryerror):
|
D | test_tempfile.py | 229 with support.swap_attr(tempfile, "_candidate_tempdir_list", 238 with support.swap_attr(io, "open", raise_OSError): 250 with support.swap_attr(io, "open", bad_writer) as orig_open: 284 with support.swap_attr(tempfile, 'tempdir', dir): 291 return support.swap_attr(tempfile, 316 with support.swap_attr(tempfile, 'tempdir', tempdir): 325 with support.swap_attr(tempfile, 'tempdir', tempdir):
|
D | test_tools.py | 438 with test_support.swap_attr(sys, "argv", argv), \ 439 test_support.swap_attr(sys, "stdin", StringIO(input)), \
|
D | test_strptime.py | 319 with support.swap_attr(time, 'tzname', (tz_name, tz_name)), \ 320 support.swap_attr(time, 'daylight', 1), \ 321 support.swap_attr(time, 'tzset', lambda: None):
|
D | test_poplib.py | 220 with test_support.swap_attr(self.client, 'welcome', evil_welcome):
|
/external/python/cpython3/Lib/test/test_tools/ |
D | test_fixcid.py | 84 with support.swap_attr(sys, "argv", argv), \ 85 support.swap_attr(sys, "stdin", StringIO(input)), \
|
/external/python/cpython3/Lib/tkinter/test/test_ttk/ |
D | test_extensions.py | 5 from test.support import requires, run_unittest, swap_attr 52 with swap_attr(tkinter, '_default_root', None), \ 53 swap_attr(tkinter, '_support_default_root', True):
|
/external/python/cpython2/Lib/lib-tk/test/test_ttk/ |
D | test_extensions.py | 5 from test.test_support import requires, run_unittest, swap_attr 52 with swap_attr(tkinter, '_default_root', None), \ 53 swap_attr(tkinter, '_support_default_root', True):
|
/external/python/cpython2/Lib/distutils/tests/ |
D | test_spawn.py | 94 with test_support.swap_attr(spawn.os, 'defpath', tmp_dir):
|
/external/python/cpython3/Lib/test/test_warnings/ |
D | __init__.py | 829 with support.swap_attr(wmod, 'onceregistry', None): 844 with support.swap_attr(wmod, 'defaultaction', None), \ 917 with support.swap_attr(self.module, 'formatwarning', myformatwarning): 1058 with support.swap_attr(wmod, 'showwarning', my_logger):
|
/external/python/cpython3/Lib/test/test_import/ |
D | __init__.py | 24 make_legacy_pyc, rmtree, swap_attr, swap_item, temp_umask, 431 with swap_attr(os, '__name__', None): 823 with swap_attr(builtins, "__import__", lambda *x: 5):
|