test: format all test scripts

This commit is contained in:
igor.udot
2025-02-24 10:18:03 +08:00
parent 717c18a58e
commit daf2d31008
381 changed files with 6180 additions and 4289 deletions

View File

@@ -1,15 +1,13 @@
# SPDX-FileCopyrightText: 2022-2023 Espressif Systems (Shanghai) CO LTD
# SPDX-FileCopyrightText: 2022-2025 Espressif Systems (Shanghai) CO LTD
# SPDX-License-Identifier: Unlicense OR CC0-1.0
import logging
import re
import pytest
from pytest_embedded import Dut
from pytest_embedded_idf.utils import idf_parametrize
@pytest.mark.esp32s3
@pytest.mark.emmc
@pytest.mark.parametrize(
'config',
@@ -20,6 +18,7 @@ from pytest_embedded import Dut
],
indirect=True,
)
@idf_parametrize('target', ['esp32s3'], indirect=['target'])
def test_examples_sd_card_sdmmc(dut: Dut) -> None:
dut.expect('example: Initializing eMMC', timeout=20)
dut.expect('example: Using SDMMC peripheral', timeout=10)
@@ -35,12 +34,14 @@ def test_examples_sd_card_sdmmc(dut: Dut) -> None:
logging.info('Card {} {} {}MHz {} found'.format(name, _type, speed, size))
message_list = ('Opening file /eMMC/hello.txt',
'File written',
'Renaming file /eMMC/hello.txt to /eMMC/foo.txt',
'Reading file /eMMC/foo.txt',
"Read from file: 'Hello {}!'".format(name),
'Card unmounted')
message_list = (
'Opening file /eMMC/hello.txt',
'File written',
'Renaming file /eMMC/hello.txt to /eMMC/foo.txt',
'Reading file /eMMC/foo.txt',
"Read from file: 'Hello {}!'".format(name),
'Card unmounted',
)
for msg in message_list:
dut.expect(msg, timeout=10)