mirror of
https://github.com/espressif/esp-idf.git
synced 2025-08-08 12:10:59 +00:00
test: format all test scripts
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
# SPDX-FileCopyrightText: 2021-2024 Espressif Systems (Shanghai) CO LTD
|
||||
# SPDX-FileCopyrightText: 2021-2025 Espressif Systems (Shanghai) CO LTD
|
||||
# SPDX-License-Identifier: Apache-2.0
|
||||
import logging
|
||||
import socket
|
||||
@@ -9,12 +9,14 @@ from common_test_methods import get_host_ip4_by_dest_ip
|
||||
from common_test_methods import get_host_ip6_by_dest_ip
|
||||
from common_test_methods import get_my_interface_by_dest_ip
|
||||
from pytest_embedded import Dut
|
||||
from pytest_embedded_idf.utils import idf_parametrize
|
||||
|
||||
try:
|
||||
from run_tcp_server import TcpServer
|
||||
except ImportError:
|
||||
import os
|
||||
import sys
|
||||
|
||||
sys.path.append(os.path.abspath(os.path.join(os.path.dirname(__file__), '..', 'scripts')))
|
||||
from run_tcp_server import TcpServer
|
||||
|
||||
@@ -22,15 +24,12 @@ except ImportError:
|
||||
PORT = 3333
|
||||
|
||||
|
||||
@pytest.mark.esp32
|
||||
@pytest.mark.esp32s2
|
||||
@pytest.mark.esp32c2
|
||||
@pytest.mark.esp32c3
|
||||
@pytest.mark.esp32s3
|
||||
@pytest.mark.esp32c5
|
||||
@pytest.mark.esp32c6
|
||||
@pytest.mark.esp32c61
|
||||
@pytest.mark.wifi_router
|
||||
@idf_parametrize(
|
||||
'target',
|
||||
['esp32', 'esp32s2', 'esp32c2', 'esp32c3', 'esp32s3', 'esp32c5', 'esp32c6', 'esp32c61'],
|
||||
indirect=['target'],
|
||||
)
|
||||
def test_examples_tcp_client_ipv4(dut: Dut) -> None:
|
||||
# Parse IP address of STA
|
||||
logging.info('Waiting to connect with AP')
|
||||
@@ -51,14 +50,10 @@ def test_examples_tcp_client_ipv4(dut: Dut) -> None:
|
||||
dut.expect('OK: Message from ESP32')
|
||||
|
||||
|
||||
@pytest.mark.esp32
|
||||
@pytest.mark.esp32s2
|
||||
@pytest.mark.esp32c2
|
||||
@pytest.mark.esp32c3
|
||||
@pytest.mark.esp32s3
|
||||
@pytest.mark.esp32c6
|
||||
@pytest.mark.esp32c61
|
||||
@pytest.mark.wifi_router
|
||||
@idf_parametrize(
|
||||
'target', ['esp32', 'esp32s2', 'esp32c2', 'esp32c3', 'esp32s3', 'esp32c6', 'esp32c61'], indirect=['target']
|
||||
)
|
||||
def test_examples_tcp_client_ipv6(dut: Dut) -> None:
|
||||
# Parse IP address of STA
|
||||
logging.info('Waiting to connect with AP')
|
||||
|
Reference in New Issue
Block a user