Adding test dependencies inside tox.in is clearly not an ideal approach as it creates a hard dependency on a specific testing tool, making impossible to automate installation of test dependencies for users that do not want to use tox.
In the past there was a setuptools tests_require which was deprecated and if I remember well there was a suggestion to use extras to achieve the same functionality.
The main benefit of using extras is that it very simple for a developer to do a “pip install foo[test]”. I seen it used in several projects.
Another benefit from this approach is that it keeps all dependencies in a single place, instead of spreading them in multiple places.
Still, I am raising the question here because I want some feedback from others and see if there are any downsides for doing this, or a better alternative. Please refrain from suggesting features that are not yet working, like pep-621.