In the default behaviour giving the command python setup.py test
will execute the unit tests associated with a module. This default behaviour can be made to work simply by providing a list of test-suite modules.
The alternative (but now obsolete) Nose test runner has a comparable feature - you can just provide the string nose.collector
which gives the test command the ability to auto-discover the tests associated with the project.
But what if I'm using pytest? There doesn't seem to be a documented pattern to run tests from the setup.py file. Is this a behaviour supported by the pytest library?