mirror of
https://github.com/espressif/esp-idf.git
synced 2025-08-09 12:35:28 +00:00
test: move spi related unit-test into pytest app
This commit is contained in:
24
components/driver/test_apps/spi/param/pytest_spi_param.py
Normal file
24
components/driver/test_apps/spi/param/pytest_spi_param.py
Normal file
@@ -0,0 +1,24 @@
|
||||
# SPDX-FileCopyrightText: 2021-2022 Espressif Systems (Shanghai) CO LTD
|
||||
# SPDX-License-Identifier: Apache-2.0
|
||||
|
||||
import pytest
|
||||
|
||||
|
||||
# If `test_env` is define, should not run on generic runner
|
||||
@pytest.mark.supported_targets
|
||||
@pytest.mark.generic
|
||||
def test_param_single_dev(case_tester) -> None: # type: ignore
|
||||
for case in case_tester.test_menu:
|
||||
if 'test_env' in case.attributes:
|
||||
continue
|
||||
case_tester.run_normal_case(case=case, reset=True)
|
||||
|
||||
|
||||
# if `test_env` not defined, will run on `generic_multi_device` by default
|
||||
@pytest.mark.supported_targets
|
||||
@pytest.mark.generic_multi_device
|
||||
@pytest.mark.parametrize('count', [2,], indirect=True)
|
||||
def test_param_multi_dev(case_tester) -> None: # type: ignore
|
||||
for case in case_tester.test_menu:
|
||||
if case.attributes.get('test_env', 'generic_multi_device') == 'generic_multi_device':
|
||||
case_tester.run_multi_dev_case(case=case, reset=True)
|
Reference in New Issue
Block a user