forked from espressif/esp-idf
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:
@@ -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 = [
|
||||
|
Reference in New Issue
Block a user