PyTest is mostly compatible with the unittest module (apart from support for subtests). Test suites written with unittest can be directly run under pytest with no modification usually. For example, our chat application test suite can be directly run under pytest by simply invoking pytest within the project directory:
$ pytest -v
============ test session starts ============
platform linux -- Python 3.7.3, pytest-5.4.3, py-1.8.1, pluggy-0.13.1
cachedir: .pytest_cache
rootdir: /chatapp
collected 11 items
benchmarks/test_chat.py::BenchmarkChat::test_sending_messages PASSED [ 9%]
tests/e2e/test_chat.py::TestChatAcceptance::test_message_exchange PASSED [ 18%]
tests/e2e/test_chat.py::TestChatAcceptance::test_smoke_sending_message PASSED [ 27%]
tests/functional/test_chat.py::TestChatMessageExchange::test_exchange_with_server PASSED [ 36%]
tests/functional/test_chat.py::TestChatMessageExchange::test_many_users PASSED [ 45%]
tests/functional/test_chat.py::TestChatMessageExchange...