raptor.conformance.pytest_rows

raptor.conformance.pytest_rows#

A pytest plugin that records which certification rows RAN and passed.

register_row fires when a test module is imported, so on its own it cannot tell a row that ran from one that was deselected, skipped or failed. raptor.conformance.interop.assert_rows_complete() (ran=True) reads this plugin instead: a row counts on a leg only if every test registered for that (row, leg) ran and passed in this session.

Load it from the suite’s conftest.py:

pytest_plugins = ["raptor.conformance.pytest_rows"]

and mark the test that calls assert_rows_complete with @pytest.mark.rows_gate: the plugin runs those tests last, so every row test has finished by then.

Pure Python; imports pytest only through the hooks pytest hands it.

Functions

pytest_collection_modifyitems(…)

Run the rows_gate tests last.

pytest_configure(…)

Start a clean record and register the rows_gate marker.

pytest_deselected(…)

A deselected row test is not a run.

pytest_itemcollected(…)

Remember the rows each collected test registered.

pytest_runtest_logreport(…)

Record a row test as passed, or as not passed on any other outcome.

unfinished(…)

The (row, leg) pairs in pairs without a passing run, each as a one-line reason.