A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://docs.espressif.com/projects/pytest-embedded/en/latest/ below:

Website Navigation


pytest-embedded 1.x Documentation — pytest-embedded 1.x documentation

pytest-embedded 1.x Documentation pytest-embedded

A pytest plugin that has multiple services available for various functionalities. Designed for embedded testing.

Installation

Packages under this repo mainly use semantic versioning. Sometimes a bug fix version may contain some non-breaking new features as well.

It is recommended to use ~=1.0 to get rid of breaking changes, and use the latest new features. For example,

pip install -U pytest-embedded~=1.0
Quickstart
from pytest_embedded import Dut


def test_basic_expect(redirect, dut: Dut):
    with redirect():
        print('this would be redirected')

    dut.expect('this')
    dut.expect_exact('would')
    dut.expect('[be]{2}')
    dut.expect_exact('redirected')
collected 1 item

test_basic.py .                                                        [100%]

============================= 1 passed in 0.01s =============================
collected 1 item

test_basic.py 2022-01-01 12:34:56 this would be redirected
.

============================= 1 passed in 0.01s =============================

The print line is also duplicated to console output.

Resources

RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4