mirror of
https://github.com/espressif/esp-idf.git
synced 2025-08-08 12:10:59 +00:00
ci: migrate examples/cxx ttfw test scripts to pytest
This commit is contained in:
19
examples/cxx/exceptions/pytest_examples_cxx_exceptions.py
Normal file
19
examples/cxx/exceptions/pytest_examples_cxx_exceptions.py
Normal file
@@ -0,0 +1,19 @@
|
||||
# SPDX-FileCopyrightText: 2023 Espressif Systems (Shanghai) CO LTD
|
||||
# SPDX-License-Identifier: Unlicense OR CC0-1.0
|
||||
import pytest
|
||||
from pytest_embedded_idf.dut import IdfDut
|
||||
|
||||
|
||||
@pytest.mark.supported_targets
|
||||
@pytest.mark.generic
|
||||
def test_examples_cpp_exceptions(dut: IdfDut) -> None:
|
||||
lines = [
|
||||
'app_main starting',
|
||||
'In constructor, arg=42',
|
||||
'In constructor, arg=0',
|
||||
'In destructor, m_arg=42',
|
||||
'Exception caught: Exception in constructor',
|
||||
'app_main done',
|
||||
]
|
||||
for line in lines:
|
||||
dut.expect(line, timeout=2)
|
Reference in New Issue
Block a user