pypa / packaging.python.org

Python Packaging User Guide
http://packaging.python.org
1.42k stars 916 forks source link

Provide some guidance on specifying test dependencies #768

Open nchammas opened 4 years ago

nchammas commented 4 years ago

The packaging guide could use a brief blurb providing guidance on how to specify test dependencies for your project.

Some background:

Would it make sense to add something to the setuptools guide on specifying test dependencies, and specifically on whether or not to use tests_require?

What would the guidance be?

smheidrich commented 2 years ago

I agree that this should be covered.

AFAIK the current "recommended way" of doing this in setuptools is to add an optional dependency ("extra") for it, named something like tests or test.

abravalheri commented 2 years ago

Hi @smheidrich I think testing is also common, it is used in setuptools itself and I also think in virtualenv.

testing might have became popular because it is one of the examples in the tox docs.