MCPcopy Create free account
hub / github.com/numpy/numpy / tempdir

Function tempdir

numpy/testing/_private/utils.py:1902–1913  ·  view source on GitHub ↗

Context manager to provide a temporary test folder. All arguments are passed as this to the underlying tempfile.mkdtemp function.

(*args, **kwargs)

Source from the content-addressed store, hash-verified

1900
1901@contextlib.contextmanager
1902def tempdir(*args, **kwargs):
1903 """Context manager to provide a temporary test folder.
1904
1905 All arguments are passed as this to the underlying tempfile.mkdtemp
1906 function.
1907
1908 """
1909 tmpdir = mkdtemp(*args, **kwargs)
1910 try:
1911 yield tmpdir
1912 finally:
1913 shutil.rmtree(tmpdir)
1914
1915
1916@contextlib.contextmanager

Callers 8

test_isfileobjFunction · 0.90
test_unicodeMethod · 0.90
check_large_zipMethod · 0.90
get_targetsMethod · 0.90
check_execute_inMethod · 0.90
test_tempdirFunction · 0.90

Calls

no outgoing calls

Tested by 8

test_isfileobjFunction · 0.72
test_unicodeMethod · 0.72
check_large_zipMethod · 0.72
get_targetsMethod · 0.72
check_execute_inMethod · 0.72
test_tempdirFunction · 0.72