+1 to @kartiks77
quite likely that this wasn't available yet at the time of the question (added in version 6.0)
I opted for specifying testpaths, but addopts works too, and it's very good to know for setting defaults
# pyproject.toml
[tool.pytest.ini_options]
minversion = "6.0"
addopts = "-ra -q"
testpaths = [
"tests",
"integration",
]
from pytest's docs