From 359ada94130543bfab6ca517c56efa53b2381f21 Mon Sep 17 00:00:00 2001 From: armando Date: Tue, 18 Nov 2025 14:09:40 +0800 Subject: [PATCH] fix(ci): fixed sdspi pytest check --- .../storage/sd_card/sdspi/pytest_sdspi_card_example.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/examples/storage/sd_card/sdspi/pytest_sdspi_card_example.py b/examples/storage/sd_card/sdspi/pytest_sdspi_card_example.py index 086b6c70b7..8a0c222fca 100644 --- a/examples/storage/sd_card/sdspi/pytest_sdspi_card_example.py +++ b/examples/storage/sd_card/sdspi/pytest_sdspi_card_example.py @@ -24,22 +24,22 @@ def test_examples_sd_card_sdspi(dut: Dut) -> None: speed = dut.expect(re.compile(rb'Speed: (\S+)'), timeout=20).group(1).decode() size = dut.expect(re.compile(rb'Size: (\S+)'), timeout=20).group(1).decode() - logging.info('Card {} {} {}MHz {} found'.format(name, _type, speed, size)) + logging.info(f'Card {name} {_type} {speed}MHz {size} found') message_list1 = ( 'Opening file /sdcard/hello.txt', 'File written', 'Renaming file /sdcard/hello.txt to /sdcard/foo.txt', 'Reading file /sdcard/foo.txt', - "Read from file: 'Hello {}!'".format(name), + f"Read from file: 'Hello {name}!'", ) - sd_card_format = re.compile(str.encode('Formatting card, allocation unit size=\\S+')) + sd_card_format = re.compile(str.encode('formatting drive, allocation unit size=\\S+')) message_list2 = ( "file doesn't exist, formatting done", 'Opening file /sdcard/nihao.txt', 'File written', 'Reading file /sdcard/nihao.txt', - "Read from file: 'Nihao {}!'".format(name), + f"Read from file: 'Nihao {name}!'", 'Card unmounted', )