mirror of
https://github.com/espressif/esp-idf.git
synced 2025-11-18 18:40:13 +00:00
test: format all test scripts
This commit is contained in:
@@ -1,15 +1,13 @@
|
||||
#!/usr/bin/env python
|
||||
#
|
||||
# SPDX-FileCopyrightText: 2018-2022 Espressif Systems (Shanghai) CO LTD
|
||||
# SPDX-FileCopyrightText: 2018-2025 Espressif Systems (Shanghai) CO LTD
|
||||
# SPDX-License-Identifier: Apache-2.0
|
||||
|
||||
from __future__ import division, print_function, unicode_literals
|
||||
|
||||
import logging
|
||||
import os
|
||||
import sys
|
||||
|
||||
import pytest
|
||||
from pytest_embedded_idf.utils import idf_parametrize
|
||||
|
||||
try:
|
||||
from idf_http_server_test import test as client
|
||||
@@ -32,12 +30,9 @@ from pytest_embedded import Dut
|
||||
# features to this component.
|
||||
|
||||
|
||||
@pytest.mark.esp32
|
||||
@pytest.mark.esp32c3
|
||||
@pytest.mark.esp32s3
|
||||
@pytest.mark.wifi_router
|
||||
@idf_parametrize('target', ['esp32', 'esp32c3', 'esp32s3'], indirect=['target'])
|
||||
def test_examples_protocol_http_server_advanced(dut: Dut) -> None:
|
||||
|
||||
# Get binary file
|
||||
binary_file = os.path.join(dut.app.binary_path, 'tests.bin')
|
||||
bin_size = os.path.getsize(binary_file)
|
||||
@@ -57,9 +52,12 @@ def test_examples_protocol_http_server_advanced(dut: Dut) -> None:
|
||||
|
||||
got_port = dut.expect(r"(?:[\s\S]*)Started HTTP server on port: '(\d+)'", timeout=30)[1].decode()
|
||||
|
||||
result = dut.expect(r"(?:[\s\S]*)Max URI handlers: '(\d+)'(?:[\s\S]*)Max Open Sessions: " # noqa: W605
|
||||
r"'(\d+)'(?:[\s\S]*)Max Header Length: '(\d+)'(?:[\s\S]*)Max URI Length: "
|
||||
r"'(\d+)'(?:[\s\S]*)Max Stack Size: '(\d+)'", timeout=15)
|
||||
result = dut.expect(
|
||||
r"(?:[\s\S]*)Max URI handlers: '(\d+)'(?:[\s\S]*)Max Open Sessions: " # noqa: W605
|
||||
r"'(\d+)'(?:[\s\S]*)Max Header Length: '(\d+)'(?:[\s\S]*)Max URI Length: "
|
||||
r"'(\d+)'(?:[\s\S]*)Max Stack Size: '(\d+)'",
|
||||
timeout=15,
|
||||
)
|
||||
# max_uri_handlers = int(result[1])
|
||||
max_sessions = int(result[2])
|
||||
max_hdr_len = int(result[3])
|
||||
|
||||
Reference in New Issue
Block a user