Pytest

Pytest

Как запускать определенные тесты

https://docs.pytest.org/en/7.1.x/example/markers.html

Можно пометить тест след. образом:

# content of test_server.py

import pytest

@pytest.mark.webtest
def test_send_http():
    pass  # perform some webtest test for your app
    

Зарегистрировать маркер в pytest.ini:

markers =
    webtest: mark a test as a webtest.

И запустить тесты с

pytest -v -m webtest

Показать принты

Use the -s option:

pytest -s