Skip to content

Commit

Permalink
rename fun
Browse files Browse the repository at this point in the history
  • Loading branch information
giampaolo committed Feb 14, 2018
1 parent 62e1783 commit d690ae6
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions psutil/tests/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -283,7 +283,7 @@ def stop(self):
# ===================================================================


def _cleanup_on_err(fun):
def _reap_children_on_err(fun):
@functools.wraps(fun)
def wrapper(*args, **kwargs):
try:
Expand All @@ -294,7 +294,7 @@ def wrapper(*args, **kwargs):
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.
Expand Down Expand Up @@ -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).
Expand Down Expand Up @@ -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.
Expand All @@ -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.
Expand Down

0 comments on commit d690ae6

Please sign in to comment.