Can we use Pytest for integration testing?

Can we use Pytest for integration testing?

Yes, it’s possible to mark your tests using pytest. mark decorator. All you need to do is run pytest -m"not integtest" directly from the command line. This is applicable only for unit tests whereas pytest -m integtest can be used mainly for integration test as well as plain pytest.