mirror of
https://github.com/espressif/esp-idf.git
synced 2025-08-04 21:24:32 +02:00
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
|
# SPDX-License-Identifier: Apache-2.0
|
||||||
|
|
||||||
import logging
|
import logging
|
||||||
import os
|
import os
|
||||||
import socket
|
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
|
import yaml
|
||||||
|
|
||||||
ENV_CONFIG_FILE_SEARCH = [
|
ENV_CONFIG_FILE_SEARCH = [
|
||||||
|
Reference in New Issue
Block a user