summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGiampaolo Rodola <g.rodola@gmail.com>2017-05-18 20:05:37 +0200
committerGiampaolo Rodola <g.rodola@gmail.com>2017-05-18 20:05:37 +0200
commit3fa7ad66061808369137d995306022aa7406b9b1 (patch)
tree50ac5502d62b8b26df6bbc4042526774d96e3ebf
parent48da89ea4a6221ee5dc010aa14642319697f6073 (diff)
downloadpsutil-3fa7ad66061808369137d995306022aa7406b9b1.tar.gz
skip UNIX socket tests on SUNOS
-rwxr-xr-xpsutil/tests/test_contracts.py2
-rwxr-xr-xpsutil/tests/test_unicode.py2
2 files changed, 4 insertions, 0 deletions
diff --git a/psutil/tests/test_contracts.py b/psutil/tests/test_contracts.py
index 7dd83259..65bad757 100755
--- a/psutil/tests/test_contracts.py
+++ b/psutil/tests/test_contracts.py
@@ -30,6 +30,7 @@ from psutil._compat import long
from psutil.tests import bind_unix_socket
from psutil.tests import check_connection_ntuple
from psutil.tests import get_kernel_version
+from psutil.tests import HAS_CONNECTIONS_UNIX
from psutil.tests import HAS_RLIMIT
from psutil.tests import HAS_SENSORS_FANS
from psutil.tests import HAS_SENSORS_TEMPERATURES
@@ -201,6 +202,7 @@ class TestSystem(unittest.TestCase):
self.assertIsInstance(disk.opts, str)
@unittest.skipIf(not POSIX, 'POSIX only')
+ @unittest.skipIf(not HAS_CONNECTIONS_UNIX, "can't list UNIX sockets")
@skip_on_access_denied(only_if=OSX)
def test_net_connections(self):
with unix_socket_path() as name:
diff --git a/psutil/tests/test_unicode.py b/psutil/tests/test_unicode.py
index 7c87a3f2..05e0ebcb 100755
--- a/psutil/tests/test_unicode.py
+++ b/psutil/tests/test_unicode.py
@@ -72,6 +72,7 @@ from psutil.tests import chdir
from psutil.tests import copyload_shared_lib
from psutil.tests import create_exe
from psutil.tests import get_test_subprocess
+from psutil.tests import HAS_CONNECTIONS_UNIX
from psutil.tests import HAS_ENVIRON
from psutil.tests import HAS_MEMORY_MAPS
from psutil.tests import mock
@@ -247,6 +248,7 @@ class _BaseFSAPIsTests(object):
self.assertEqual(conn.laddr, name)
@unittest.skipIf(not POSIX, "POSIX only")
+ @unittest.skipIf(not HAS_CONNECTIONS_UNIX, "can't list UNIX sockets")
@skip_on_access_denied()
def test_net_connections(self):
def find_sock(cons):