pytest: check duplicates test case/script names

This commit is contained in:
Fu Hanxi 2022-12-05 14:48:12 +08:00
parent df63cd0765
commit 67cd264535
6 changed files with 6 additions and 5 deletions

View File

@ -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)

View File

@ -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)

View File

@ -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')

View File

@ -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')

View File

@ -11,6 +11,7 @@ addopts =
--strict-markers
--skip-check-coredump y
--logfile-extension ".txt"
--check-duplicates y
# ignore DeprecationWarning
filterwarnings =

View File

@ -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')