summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGiampaolo Rodola <g.rodola@gmail.com>2018-02-14 14:02:37 +0100
committerGiampaolo Rodola <g.rodola@gmail.com>2018-02-14 14:02:37 +0100
commitd690ae6283b996ffd2098e47652bf84cbd7e87bf (patch)
treeb9a5e07081799389fe99423d589af6736bba4edb
parent62e1783764420f36cd270135decb00b324add7fe (diff)
downloadpsutil-d690ae6283b996ffd2098e47652bf84cbd7e87bf.tar.gz
rename fun
-rw-r--r--psutil/tests/__init__.py10
1 files changed, 5 insertions, 5 deletions
diff --git a/psutil/tests/__init__.py b/psutil/tests/__init__.py
index 9e8d8596..499240fb 100644
--- a/psutil/tests/__init__.py
+++ b/psutil/tests/__init__.py
@@ -283,7 +283,7 @@ class ThreadTask(threading.Thread):
# ===================================================================
-def _cleanup_on_err(fun):
+def _reap_children_on_err(fun):
@functools.wraps(fun)
def wrapper(*args, **kwargs):
try:
@@ -294,7 +294,7 @@ def _cleanup_on_err(fun):
return wrapper
-@_cleanup_on_err
+@_reap_children_on_err
def get_test_subprocess(cmd=None, **kwds):
"""Creates a python subprocess which does nothing for 60 secs and
return it as subprocess.Popen instance.
@@ -327,7 +327,7 @@ def get_test_subprocess(cmd=None, **kwds):
return sproc
-@_cleanup_on_err
+@_reap_children_on_err
def create_proc_children_pair():
"""Create a subprocess which creates another one as in:
A (us) -> B (child) -> C (grandchild).
@@ -399,7 +399,7 @@ def create_zombie_proc():
conn.close()
-@_cleanup_on_err
+@_reap_children_on_err
def pyrun(src, **kwds):
"""Run python 'src' code string in a separate interpreter.
Returns a subprocess.Popen instance.
@@ -416,7 +416,7 @@ def pyrun(src, **kwds):
return subp
-@_cleanup_on_err
+@_reap_children_on_err
def sh(cmd, **kwds):
"""run cmd in a subprocess and return its output.
raises RuntimeError on error.