From: Vincent Bernat Date: Thu, 12 Mar 2020 12:25:37 +0000 (+0100) Subject: tests: do not check for MED inventory if /sys/class/dmi not available X-Git-Tag: 1.0.6~27 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=2bab421823de74776960526c73d5ef6f89644377;p=thirdparty%2Flldpd.git tests: do not check for MED inventory if /sys/class/dmi not available --- diff --git a/tests/integration/test_med.py b/tests/integration/test_med.py index c54131f9..3f20e40e 100644 --- a/tests/integration/test_med.py +++ b/tests/integration/test_med.py @@ -1,3 +1,4 @@ +import os import pytest import platform import time @@ -36,6 +37,8 @@ class TestLldpMed(object): 'MDI/PD': 'yes', 'Inventory': 'yes'} + @pytest.mark.skipif(not os.path.isdir("/sys/class/dmi/id"), + reason="/sys/class/dmi not available") def test_med_inventory(self, lldpd1, lldpd, lldpcli, namespaces, replace_file): with namespaces(2):