ci: bypass import failure while checking test scripts

we mock the missing packages in pytest_collectstart in plugin.py.
but here the common_test_methods are imported by other scripts, which
got executed earlier.
This commit is contained in:
Fu Hanxi
2024-10-16 09:37:50 +02:00
parent 974eb7933d
commit 910bea1a1d

View File

@@ -1,12 +1,19 @@
# SPDX-FileCopyrightText: 2022 Espressif Systems (Shanghai) CO LTD
# SPDX-FileCopyrightText: 2022-2024 Espressif Systems (Shanghai) CO LTD
# SPDX-License-Identifier: Apache-2.0
import logging
import os
import socket
from typing import Any, List
from typing import Any
from typing import List
try:
import netifaces
except ImportError:
from unittest.mock import MagicMock
netifaces = MagicMock()
logging.warning('netifaces is not installed. Please install it to get network interface information.')
import netifaces
import yaml
ENV_CONFIG_FILE_SEARCH = [