diff options
author | Giampaolo Rodola <g.rodola@gmail.com> | 2015-07-09 11:43:48 +0200 |
---|---|---|
committer | Giampaolo Rodola <g.rodola@gmail.com> | 2015-07-09 11:43:48 +0200 |
commit | 192aa78c90253bede27b2745d4e80aeed79a3aef (patch) | |
tree | 3288344a8695ac4fd53162546fb051229c921e4d /test/_posix.py | |
parent | a6cb7f927f40bd129f31493c37dfe7d0d6f6a070 (diff) | |
parent | 73f54f47a7d4eac329c27af71c7fc5ad432d2e84 (diff) | |
download | psutil-get_open_files_thread.tar.gz |
Merge branch 'master' into get_open_files_threadget_open_files_thread
Diffstat (limited to 'test/_posix.py')
-rw-r--r-- | test/_posix.py | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/test/_posix.py b/test/_posix.py index 4439f2c7..2a263a3f 100644 --- a/test/_posix.py +++ b/test/_posix.py @@ -15,7 +15,7 @@ import time import psutil from psutil._compat import PY3, callable -from test_psutil import LINUX, SUNOS, OSX, BSD, PYTHON +from test_psutil import LINUX, SUNOS, OSX, BSD, PYTHON, POSIX from test_psutil import (get_test_subprocess, skip_on_access_denied, retry_before_failing, reap_children, sh, unittest, get_kernel_version, wait_for_pid) @@ -42,6 +42,7 @@ def ps(cmd): return output +@unittest.skipUnless(POSIX, "not a POSIX system") class PosixSpecificTestCase(unittest.TestCase): """Compare psutil results against 'ps' command line utility.""" @@ -243,12 +244,12 @@ class PosixSpecificTestCase(unittest.TestCase): self.fail('\n' + '\n'.join(failures)) -def test_main(): +def main(): test_suite = unittest.TestSuite() test_suite.addTest(unittest.makeSuite(PosixSpecificTestCase)) result = unittest.TextTestRunner(verbosity=2).run(test_suite) return result.wasSuccessful() if __name__ == '__main__': - if not test_main(): + if not main(): sys.exit(1) |