pytest_button.py 706 B

1234567891011121314151617181920212223
  1. # SPDX-FileCopyrightText: 2022-2023 Espressif Systems (Shanghai) CO LTD
  2. # SPDX-License-Identifier: Apache-2.0
  3. '''
  4. Steps to run these cases:
  5. - Build
  6. - . ${IDF_PATH}/export.sh
  7. - pip install idf_build_apps
  8. - python tools/build_apps.py components/button/test_apps -t esp32s3
  9. - Test
  10. - pip install -r tools/requirements/requirement.pytest.txt
  11. - pytest components/button/test_apps --target esp32s3
  12. '''
  13. import pytest
  14. from pytest_embedded import Dut
  15. @pytest.mark.target('esp32s3')
  16. @pytest.mark.env('button')
  17. def test_usb_stream(dut: Dut)-> None:
  18. dut.expect_exact('Press ENTER to see the list of tests.')
  19. dut.write('[auto]')
  20. dut.expect_unity_test_output(timeout = 60)