From 67cd264535eb24b3908e7f308ede45f65deff4e6 Mon Sep 17 00:00:00 2001 From: Fu Hanxi Date: Mon, 5 Dec 2022 14:48:12 +0800 Subject: [PATCH] pytest: check duplicates test case/script names --- examples/storage/nvs_rw_value_cxx/pytest_nvs_rw_value_cxx.py | 2 +- examples/storage/sd_card/sdspi/pytest_sdspi_card_example.py | 2 +- examples/system/ulp_fsm/ulp/pytest_ulp_fsm.py | 2 +- examples/system/ulp_fsm/ulp_adc/pytest_ulp_fsm_adc.py | 2 +- pytest.ini | 1 + tools/test_apps/system/longjmp_test/pytest_longjmp.py | 2 +- 6 files changed, 6 insertions(+), 5 deletions(-) diff --git a/examples/storage/nvs_rw_value_cxx/pytest_nvs_rw_value_cxx.py b/examples/storage/nvs_rw_value_cxx/pytest_nvs_rw_value_cxx.py index f42756d6f4..86cf0105fa 100644 --- a/examples/storage/nvs_rw_value_cxx/pytest_nvs_rw_value_cxx.py +++ b/examples/storage/nvs_rw_value_cxx/pytest_nvs_rw_value_cxx.py @@ -10,7 +10,7 @@ from pytest_embedded import Dut @pytest.mark.esp32 @pytest.mark.esp32c3 -def test_examples_nvs_rw_value(dut: Dut) -> None: +def test_examples_nvs_rw_value_cxx(dut: Dut) -> None: for i, counter_state in zip_longest(range(4), ('The value is not initialized yet!',), fillvalue='Done'): dut.expect('Opening Non-Volatile Storage \\(NVS\\) handle... Done', timeout=20) dut.expect('Reading restart counter from NVS ... {}'.format(counter_state), timeout=20) 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 4090ea23d7..3430be4b77 100644 --- a/examples/storage/sd_card/sdspi/pytest_sdspi_card_example.py +++ b/examples/storage/sd_card/sdspi/pytest_sdspi_card_example.py @@ -13,7 +13,7 @@ from pytest_embedded import Dut @pytest.mark.esp32c3 # no runner available at the moment @pytest.mark.esp32s2 @pytest.mark.sdcard_spimode -def test_examples_sd_card_sdmmc(dut: Dut) -> None: +def test_examples_sd_card_sdspi(dut: Dut) -> None: dut.expect('example: Initializing SD card', timeout=20) dut.expect('example: Using SPI peripheral', timeout=20) diff --git a/examples/system/ulp_fsm/ulp/pytest_ulp_fsm.py b/examples/system/ulp_fsm/ulp/pytest_ulp_fsm.py index bdae64b455..e27b30c6e0 100644 --- a/examples/system/ulp_fsm/ulp/pytest_ulp_fsm.py +++ b/examples/system/ulp_fsm/ulp/pytest_ulp_fsm.py @@ -12,7 +12,7 @@ from pytest_embedded import Dut @pytest.mark.esp32s2 @pytest.mark.esp32s3 @pytest.mark.generic -def test_ulp_fsm(dut: Dut) -> None: +def test_example_ulp_fsm(dut: Dut) -> None: dut.expect_exact('Not ULP wakeup') dut.expect_exact('Entering deep sleep') diff --git a/examples/system/ulp_fsm/ulp_adc/pytest_ulp_fsm_adc.py b/examples/system/ulp_fsm/ulp_adc/pytest_ulp_fsm_adc.py index b5c9d9974c..1de7c78e2f 100644 --- a/examples/system/ulp_fsm/ulp_adc/pytest_ulp_fsm_adc.py +++ b/examples/system/ulp_fsm/ulp_adc/pytest_ulp_fsm_adc.py @@ -10,7 +10,7 @@ from pytest_embedded import Dut @pytest.mark.esp32 @pytest.mark.esp32s3 @pytest.mark.generic -def test_ulp_fsm_adc(dut: Dut) -> None: +def test_example_ulp_fsm_adc(dut: Dut) -> None: dut.expect_exact('Not ULP wakeup') dut.expect_exact('Entering deep sleep') diff --git a/pytest.ini b/pytest.ini index 56cc8578d1..ffc14c7019 100644 --- a/pytest.ini +++ b/pytest.ini @@ -11,6 +11,7 @@ addopts = --strict-markers --skip-check-coredump y --logfile-extension ".txt" + --check-duplicates y # ignore DeprecationWarning filterwarnings = diff --git a/tools/test_apps/system/longjmp_test/pytest_longjmp.py b/tools/test_apps/system/longjmp_test/pytest_longjmp.py index 4cdeaff28f..5499509c49 100644 --- a/tools/test_apps/system/longjmp_test/pytest_longjmp.py +++ b/tools/test_apps/system/longjmp_test/pytest_longjmp.py @@ -8,5 +8,5 @@ from pytest_embedded import Dut @pytest.mark.esp32 @pytest.mark.esp32s2 @pytest.mark.generic -def test_sys_memprot(dut: Dut) -> None: +def test_sys_longjmp(dut: Dut) -> None: dut.expect_exact('Test successful')