I think there's at least some agreement in #931 that we want to remove the test command. I think we should start by raising deprecation warnings pointing people at tox, the same way we've done for the upload and register commands.
The most likely stumbling block that I see is that I think a huge number of people have created their own test command that invokes their preferred test runner, pytest or whatever. Ideally we'd want to get the deprecation warning to them as well. Hopefully most of them are using TestCommand as their base class, though if we want to get really aggressive about it we could try parsing sys.argv directly.
I think we need to warn in the following situations:
- If the
setup.py test command is executed
- If
tests_require is specified
- If
aliases.test is specified in setup.cfg
It's likely that at least two of these will be specified, but I think two separate warnings would be useful.
CC: @gaborbernat @RonnyPfannschmidt @nicoddemus
I think there's at least some agreement in #931 that we want to remove the test command. I think we should start by raising deprecation warnings pointing people at
tox, the same way we've done for theuploadandregistercommands.The most likely stumbling block that I see is that I think a huge number of people have created their own
testcommand that invokes their preferred test runner,pytestor whatever. Ideally we'd want to get the deprecation warning to them as well. Hopefully most of them are usingTestCommandas their base class, though if we want to get really aggressive about it we could try parsingsys.argvdirectly.I think we need to warn in the following situations:
setup.py testcommand is executedtests_requireis specifiedaliases.testis specified insetup.cfgIt's likely that at least two of these will be specified, but I think two separate warnings would be useful.
CC: @gaborbernat @RonnyPfannschmidt @nicoddemus