diff --git a/tests/snmp/test_snmp_phy_entity.py b/tests/snmp/test_snmp_phy_entity.py index c2ad41a50f7..b72a9b2fae0 100644 --- a/tests/snmp/test_snmp_phy_entity.py +++ b/tests/snmp/test_snmp_phy_entity.py @@ -3,6 +3,7 @@ import time from tests.common.utilities import wait_until +from tests.common.helpers.assertions import pytest_require from tests.platform_tests.thermal_control_test_helper import mocker_factory pytestmark = [ @@ -99,6 +100,13 @@ XCVR_DOM_KEY_TEMPLATE = 'TRANSCEIVER_DOM_SENSOR|{}' +@pytest.fixture(autouse=True, scope="module") +def check_image_version(duthost): + """Skip the test for unsupported images.""" + pytest_require("201911" not in duthost.os_version, "Test not supported for 201911 images. Skipping the test") + yield + + @pytest.fixture(scope="module") def snmp_physical_entity_info(duthost, localhost, creds): """