diff options
author | Giampaolo Rodola <g.rodola@gmail.com> | 2022-07-26 22:45:18 +0200 |
---|---|---|
committer | Giampaolo Rodola <g.rodola@gmail.com> | 2022-07-26 22:45:18 +0200 |
commit | 57ed46de8a988e7ab26279c2a967fb15b05397a3 (patch) | |
tree | 5aabaa659593edf587b238bc2c23c911ae11a4c7 /psutil | |
parent | 63dec1015f6c28000f4cfe54d473ec2cc4c9e52e (diff) | |
download | psutil-57ed46de8a988e7ab26279c2a967fb15b05397a3.tar.gz |
linux: skip test if ifconfig CLI is not installed
Diffstat (limited to 'psutil')
-rwxr-xr-x | psutil/tests/test_linux.py | 2 |
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): |