__init__.py 1.4 KB

123456789101112131415161718192021222324252627282930313233343536
  1. # Copyright 2015-2017 Espressif Systems (Shanghai) PTE LTD
  2. #
  3. # Licensed under the Apache License, Version 2.0 (the "License");
  4. # you may not use this file except in compliance with the License.
  5. # You may obtain a copy of the License at
  6. #
  7. # http:#www.apache.org/licenses/LICENSE-2.0
  8. #
  9. # Unless required by applicable law or agreed to in writing, software
  10. # distributed under the License is distributed on an "AS IS" BASIS,
  11. # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  12. # See the License for the specific language governing permissions and
  13. # limitations under the License.
  14. import TinyFW
  15. from IDF.IDFApp import Example, UT
  16. from IDF.IDFDUT import IDFDUT
  17. def idf_example_test(app=Example, dut=IDFDUT, chip="ESP32",
  18. module="examples", execution_time=1,
  19. **kwargs):
  20. """
  21. decorator for testing idf examples (with default values for some keyword args).
  22. :param app: test application class
  23. :param dut: dut class
  24. :param chip: chip supported, string or tuple
  25. :param module: module, string
  26. :param execution_time: execution time in minutes, int
  27. :param kwargs: other keyword args
  28. :return: test method
  29. """
  30. # not use partial function as define as function support auto generating document
  31. return TinyFW.test_method(app=app, dut=dut, chip=chip, module=module,
  32. execution_time=execution_time, **kwargs)