Index: third_party/psutil/test/test_memory_leaks.py |
diff --git a/third_party/psutil/test/test_memory_leaks.py b/third_party/psutil/test/test_memory_leaks.py |
index b6a3a4e7cfd074a5846ba755220e0ad0654e5974..3dfb1632ea64cde1c15542719942082f1edbc589 100644 |
--- a/third_party/psutil/test/test_memory_leaks.py |
+++ b/third_party/psutil/test/test_memory_leaks.py |
@@ -1,6 +1,6 @@ |
#!/usr/bin/env python |
# |
-# $Id: test_memory_leaks.py 1142 2011-10-05 18:45:49Z g.rodola $ |
+# $Id: test_memory_leaks.py 1203 2011-10-24 19:10:36Z g.rodola $ |
# |
# Copyright (c) 2009, Jay Loden, Giampaolo Rodola'. All rights reserved. |
# Use of this source code is governed by a BSD-style license that can be |
@@ -26,6 +26,10 @@ TOLERANCE = 4096 |
if PY3: |
xrange = range |
+try: |
+ callable |
+except NameError: |
+ callable = lambda x: hasattr(x, '__call__') |
class Base(unittest.TestCase): |
@@ -141,15 +145,15 @@ class TestProcessObjectLeaks(Base): |
def test_resume(self): |
self.execute('resume') |
- @skipUnless(WINDOWS) |
+ @skipIf(not hasattr(psutil.Process, 'getcwd')) |
def test_getcwd(self): |
self.execute('getcwd') |
- @skipUnless(WINDOWS or OSX) |
def test_get_open_files(self): |
self.execute('get_open_files') |
- @skipUnless(WINDOWS or OSX) |
+ # XXX - still using provisional lsof implementation |
+ @skipIf(BSD) |
def test_get_connections(self): |
self.execute('get_connections') |