summaryrefslogtreecommitdiff
path: root/numpy/lib/user_array.py
diff options
context:
space:
mode:
authorCharles Harris <charlesr.harris@gmail.com>2015-12-24 21:04:13 -0700
committerCharles Harris <charlesr.harris@gmail.com>2015-12-26 16:04:12 -0700
commit555787a5b6a0ec4e27ce05a2c96d97b2aa48cef7 (patch)
treef1b77809cb499f255f1d6a67f5a40d46de0c317c /numpy/lib/user_array.py
parent76f2870e2f9c821b704ead165e13e173282f0aa9 (diff)
downloadnumpy-555787a5b6a0ec4e27ce05a2c96d97b2aa48cef7.tar.gz
MAINT: Simplify some tests using temppath context manager.
This replaces code of the pattern ``` fd, name = tempfile.mkstemp(...) os.close(fd) try: do stuff with name finally: os.remove(name) ``` with ``` with temppath() as name: do stuff with name ``` A few more complicated cases are also handled. The remains some particularly gnarly code the could probably be refactored to use temppath, but that is a more demanding project.
Diffstat (limited to 'numpy/lib/user_array.py')
0 files changed, 0 insertions, 0 deletions