diff options
Diffstat (limited to 'psutil/tests/test_connections.py')
-rwxr-xr-x | psutil/tests/test_connections.py | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/psutil/tests/test_connections.py b/psutil/tests/test_connections.py index 203ddebb..176e2664 100755 --- a/psutil/tests/test_connections.py +++ b/psutil/tests/test_connections.py @@ -152,6 +152,7 @@ class TestUnconnectedSockets(Base, unittest.TestCase): assert not conn.raddr self.assertEqual(conn.status, psutil.CONN_LISTEN) + @unittest.skipIf(not supports_ipv6(), "IPv6 not supported") def test_tcp_v6(self): addr = ("::1", get_free_port()) with closing(bind_socket(AF_INET6, SOCK_STREAM, addr=addr)) as sock: @@ -166,6 +167,7 @@ class TestUnconnectedSockets(Base, unittest.TestCase): assert not conn.raddr self.assertEqual(conn.status, psutil.CONN_NONE) + @unittest.skipIf(not supports_ipv6(), "IPv6 not supported") def test_udp_v6(self): addr = ("::1", get_free_port()) with closing(bind_socket(AF_INET6, SOCK_DGRAM, addr=addr)) as sock: @@ -418,7 +420,7 @@ class TestConnectedSocketPairs(Base, unittest.TestCase): # ===================================================================== -class TestSystemWideConnections(unittest.TestCase): +class TestSystemWideConnections(Base, unittest.TestCase): """Tests for net_connections().""" @skip_on_access_denied() |