mirror of
https://github.com/espressif/esp-idf.git
synced 2025-08-08 04:02:27 +00:00
test: format all test scripts
This commit is contained in:
@@ -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)
|
||||
|
Reference in New Issue
Block a user