summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGiampaolo Rodola <g.rodola@gmail.com>2015-02-11 19:14:28 +0100
committerGiampaolo Rodola <g.rodola@gmail.com>2015-02-11 19:14:28 +0100
commitbc8ed5c097dfdea2fe8410afd389b12480f19f0d (patch)
tree30fb8c9d3bc4fe9daf676507cd989d541b644691
parentbb54a548de355baeeac30fb9a7d6680f220810f1 (diff)
downloadpsutil-bc8ed5c097dfdea2fe8410afd389b12480f19f0d.tar.gz
fix travis
-rw-r--r--psutil/__init__.py1
-rw-r--r--psutil/_psutil_linux.c4
-rw-r--r--test/test_psutil.py6
3 files changed, 7 insertions, 4 deletions
diff --git a/psutil/__init__.py b/psutil/__init__.py
index af2482d6..d4f189f9 100644
--- a/psutil/__init__.py
+++ b/psutil/__init__.py
@@ -148,6 +148,7 @@ __all__ = [
"CONN_FIN_WAIT2", "CONN_TIME_WAIT", "CONN_CLOSE", "CONN_CLOSE_WAIT",
"CONN_LAST_ACK", "CONN_LISTEN", "CONN_CLOSING", "CONN_NONE",
"AF_LINK",
+ "NIC_DUPLEX_FULL", "NIC_DUPLEX_HALF", "NIC_DUPLEX_UNKNOWN",
# classes
"Process", "Popen",
# functions
diff --git a/psutil/_psutil_linux.c b/psutil/_psutil_linux.c
index cd1eb002..1161378c 100644
--- a/psutil/_psutil_linux.c
+++ b/psutil/_psutil_linux.c
@@ -481,8 +481,8 @@ error:
/*
- * Return stats about a particular network interface.
- * References:
+ * Return stats about a particular network
+ * interface. References:
* https://github.com/dpaleino/wicd/blob/master/wicd/backends/be-ioctl.py
* http://www.i-scream.org/libstatgrab/
*/
diff --git a/test/test_psutil.py b/test/test_psutil.py
index dad4ddc7..81164138 100644
--- a/test/test_psutil.py
+++ b/test/test_psutil.py
@@ -1090,6 +1090,7 @@ class TestSystemAPIs(unittest.TestCase):
elif WINDOWS:
self.assertEqual(psutil.AF_LINK, -1)
+ @unittest.skipIf(TRAVIS, "EPERM on travis")
def test_net_if_stats(self):
nics = psutil.net_if_stats()
assert nics, nics
@@ -1107,9 +1108,10 @@ class TestSystemAPIs(unittest.TestCase):
def test_net_functions_names(self):
a = psutil.net_io_counters(pernic=True).keys()
b = psutil.net_if_addrs().keys()
- c = psutil.net_if_stats().keys()
self.assertEqual(sorted(a), sorted(b))
- self.assertEqual(sorted(b), sorted(c))
+ if not TRAVIS:
+ c = psutil.net_if_stats().keys()
+ self.assertEqual(sorted(b), sorted(c))
@unittest.skipIf(LINUX and not os.path.exists('/proc/diskstats'),
'/proc/diskstats not available on this linux version')