diff --git a/sample/test/test-pytest.py b/sample/test/test-pytest.py new file mode 100644 index 00000000..28b009be --- /dev/null +++ b/sample/test/test-pytest.py @@ -0,0 +1,32 @@ +import pytest + + +def test_always_passes(): + assert True + + +@pytest.mark.skip(reason="CI CHECK") +def test_always_fails(ctx): + assert False, "Always Fail" + + +@pytest.mark.skip(reason="Test") +def test_always_skip(): + assert True + + +def test_always_xfail(): + pytest.xfail("xfail") + + +@pytest.mark.xfail(reason="always xfail") +def test_always_xpass(): + pass + + +def test_ctx(ctx): + assert ctx is not None + + +def test_dut(dut): + assert dut is not None diff --git a/sample/test/test.yaml b/sample/test/test.yaml index 72a9e6fe..0ef2c9ee 100644 --- a/sample/test/test.yaml +++ b/sample/test/test.yaml @@ -11,3 +11,10 @@ test: type: unity targets: include: [host-generic-pc] + + - name: pytest + type: pytest + kwargs: + path: phoenix-rtos-tests/sample/test/test-pytest.py + targets: + include: [host-generic-pc]