pytest_efuse.py 775 B

12345678910111213141516171819202122232425262728
  1. # SPDX-FileCopyrightText: 2022 Espressif Systems (Shanghai) CO LTD
  2. # SPDX-License-Identifier: Unlicense OR CC0-1.0
  3. from time import sleep
  4. import pytest
  5. from pytest_embedded import Dut
  6. @pytest.mark.esp32
  7. @pytest.mark.esp32c2
  8. @pytest.mark.esp32c3
  9. @pytest.mark.esp32c6
  10. @pytest.mark.generic
  11. def test_efuse(dut: Dut) -> None:
  12. dut.expect_exact('Press ENTER to see the list of tests')
  13. dut.write('*')
  14. dut.expect_unity_test_output(timeout=200)
  15. @pytest.mark.qemu
  16. @pytest.mark.esp32
  17. def test_efuse_qemu(dut: Dut) -> None:
  18. dut.expect_exact('Press ENTER to see the list of tests')
  19. # dut may not be ready to accept input, so adding the delay until handled in pytest embedded (RDT-328)
  20. sleep(1)
  21. dut.write('*')
  22. dut.expect_unity_test_output(timeout=200)