diff --git a/examples/storage/nvs_rw_value/pytest_nvs_rw_value.py b/examples/storage/nvs_rw_value/pytest_nvs_rw_value.py index a04d33a383..6d918b130a 100644 --- a/examples/storage/nvs_rw_value/pytest_nvs_rw_value.py +++ b/examples/storage/nvs_rw_value/pytest_nvs_rw_value.py @@ -11,6 +11,8 @@ from pytest_embedded import Dut @pytest.mark.esp32c3 @pytest.mark.generic def test_examples_nvs_rw_value(dut: Dut) -> None: + dut.serial.erase_flash() + dut.serial.flash() 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/nvs_rw_value_cxx/pytest_nvs_rw_value_cxx.py b/examples/storage/nvs_rw_value_cxx/pytest_nvs_rw_value_cxx.py index b085002ae3..1666d62c4d 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 @@ -11,6 +11,8 @@ from pytest_embedded import Dut @pytest.mark.esp32c3 @pytest.mark.generic def test_examples_nvs_rw_value_cxx(dut: Dut) -> None: + dut.serial.erase_flash() + dut.serial.flash() 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)