diff options
author | Giampaolo Rodola <g.rodola@gmail.com> | 2015-01-03 15:23:45 +0100 |
---|---|---|
committer | Giampaolo Rodola <g.rodola@gmail.com> | 2015-01-03 15:23:45 +0100 |
commit | 7de10ef356e079cdb170e1f8c77675b053895560 (patch) | |
tree | 9f96a0bdafa1c51887f13cddda1fd780b21ccb42 | |
parent | 609bfe087802ddab2ffb8ff42a94dc4a56e9b1ef (diff) | |
download | psutil-7de10ef356e079cdb170e1f8c77675b053895560.tar.gz |
get rid of the old check assuming Process methods where either properties or callable
-rw-r--r-- | test/test_memory_leaks.py | 10 |
1 files changed, 4 insertions, 6 deletions
diff --git a/test/test_memory_leaks.py b/test/test_memory_leaks.py index c57f4a85..614a82c6 100644 --- a/test/test_memory_leaks.py +++ b/test/test_memory_leaks.py @@ -103,9 +103,8 @@ class TestProcessObjectLeaks(Base): def call(self, function, *args, **kwargs): try: - obj = getattr(self.proc, function) - if callable(obj): - obj(*args, **kwargs) + meth = getattr(self.proc, function) + meth(*args, **kwargs) except psutil.Error: pass @@ -325,9 +324,8 @@ class TestModuleFunctionsLeaks(Base): gc.collect() def call(self, function, *args, **kwargs): - obj = getattr(psutil, function) - if callable(obj): - obj(*args, **kwargs) + fun = getattr(psutil, function) + fun(*args, **kwargs) @skip_if_linux() def test_cpu_count_logical(self): |