summaryrefslogtreecommitdiff
path: root/test/_osx.py
diff options
context:
space:
mode:
authorGiampaolo Rodola <g.rodola@gmail.com>2015-07-09 11:43:48 +0200
committerGiampaolo Rodola <g.rodola@gmail.com>2015-07-09 11:43:48 +0200
commit192aa78c90253bede27b2745d4e80aeed79a3aef (patch)
tree3288344a8695ac4fd53162546fb051229c921e4d /test/_osx.py
parenta6cb7f927f40bd129f31493c37dfe7d0d6f6a070 (diff)
parent73f54f47a7d4eac329c27af71c7fc5ad432d2e84 (diff)
downloadpsutil-get_open_files_thread.tar.gz
Merge branch 'master' into get_open_files_threadget_open_files_thread
Diffstat (limited to 'test/_osx.py')
-rw-r--r--test/_osx.py9
1 files changed, 5 insertions, 4 deletions
diff --git a/test/_osx.py b/test/_osx.py
index 784f00e0..6e6e4380 100644
--- a/test/_osx.py
+++ b/test/_osx.py
@@ -15,8 +15,8 @@ import time
import psutil
from psutil._compat import PY3
-from test_psutil import (TOLERANCE, sh, get_test_subprocess, reap_children,
- retry_before_failing, unittest)
+from test_psutil import (TOLERANCE, OSX, sh, get_test_subprocess,
+ reap_children, retry_before_failing, unittest)
PAGESIZE = os.sysconf("SC_PAGE_SIZE")
@@ -47,6 +47,7 @@ def vm_stat(field):
return int(re.search('\d+', line).group(0)) * PAGESIZE
+@unittest.skipUnless(OSX, "not an OSX system")
class OSXSpecificTestCase(unittest.TestCase):
@classmethod
@@ -148,12 +149,12 @@ class OSXSpecificTestCase(unittest.TestCase):
self.assertEqual(tot1, tot2)
-def test_main():
+def main():
test_suite = unittest.TestSuite()
test_suite.addTest(unittest.makeSuite(OSXSpecificTestCase))
result = unittest.TextTestRunner(verbosity=2).run(test_suite)
return result.wasSuccessful()
if __name__ == '__main__':
- if not test_main():
+ if not main():
sys.exit(1)