summaryrefslogtreecommitdiff
path: root/psutil
diff options
context:
space:
mode:
authorGiampaolo Rodola <g.rodola@gmail.com>2022-07-26 22:45:18 +0200
committerGiampaolo Rodola <g.rodola@gmail.com>2022-07-26 22:45:18 +0200
commit57ed46de8a988e7ab26279c2a967fb15b05397a3 (patch)
tree5aabaa659593edf587b238bc2c23c911ae11a4c7 /psutil
parent63dec1015f6c28000f4cfe54d473ec2cc4c9e52e (diff)
downloadpsutil-57ed46de8a988e7ab26279c2a967fb15b05397a3.tar.gz
linux: skip test if ifconfig CLI is not installed
Diffstat (limited to 'psutil')
-rwxr-xr-xpsutil/tests/test_linux.py2
1 files changed, 2 insertions, 0 deletions
diff --git a/psutil/tests/test_linux.py b/psutil/tests/test_linux.py
index 51e8be51..41645e3b 100755
--- a/psutil/tests/test_linux.py
+++ b/psutil/tests/test_linux.py
@@ -976,6 +976,7 @@ class TestSystemNetIfAddrs(PsutilTestCase):
@unittest.skipIf(not LINUX, "LINUX only")
class TestSystemNetIfStats(PsutilTestCase):
+ @unittest.skipIf(not which("ifconfig"), "ifconfig utility not available")
def test_against_ifconfig(self):
for name, stats in psutil.net_if_stats().items():
try:
@@ -996,6 +997,7 @@ class TestSystemNetIfStats(PsutilTestCase):
@unittest.skipIf(not LINUX, "LINUX only")
class TestSystemNetIOCounters(PsutilTestCase):
+ @unittest.skipIf(not which("ifconfig"), "ifconfig utility not available")
@retry_on_failure()
def test_against_ifconfig(self):
def ifconfig(nic):