diff options
author | Ian Wienand <iwienand@redhat.com> | 2017-01-19 15:07:35 +1100 |
---|---|---|
committer | Ian Wienand <iwienand@redhat.com> | 2017-02-24 11:30:09 +1100 |
commit | e3ad98ca19df57078de751878a38974327aa954d (patch) | |
tree | 57fb43b1bb127b921c1f7990bd55a86f6fc92047 /tox.ini | |
parent | 714990806a36395cd279acef147720136e19de75 (diff) | |
download | pbr-e3ad98ca19df57078de751878a38974327aa954d.tar.gz |
Remove testr entry point
A "testr" entry-point was added to PBR in
I2227adf3643ffe6bcece0c7d2127d23e20d52f7a in Jun 2013. However,
testrepository had already started providing this same
disutils.commands entry-point in Jan 2013 [1].
I am not sure if it is deterministic who wins when two packages
declare the same entry-point, but at least for me, running "python
setup.py testr ..." was not calling into any of the pbr hooks. I
discovered this because I wanted to use the --coverage-package-name
argument provided by the pbr testr wrapper because to s/-/_ in dib.
The original change (I8e4bc9bb78be37b4d13f8d6c2edfe2d67554ad78)
overrides the setuptools provided "test" [2] to call testrepository
when it sees a .testr.conf file (falling back to nose for
compatability). So it seems the intention was not to add a "testr"
command, but that "test" is overridden to run testr automatically when
available.
Therefore I think that testrepository owns the distutils.command
entry-point for "testr". To avoid confusion we should remove the
duplicate entry-point here and just leave the "test" command
overrides.
I've added documentation on the test command. The testr/test split is
quite confusing, being only one letter different, so that is called
out explicitly. Comments in testr_command are updated to reflect
what's happening better. This also converts the calls in tox.ini to
use the PBR wrapper "test".
[1] https://github.com/testing-cabal/testrepository/commit/2a36806c698f67f4707cfccb4baabb473e38f06c#diff-2eeaed663bd0d25b7e608891384b7298R96
[2] https://github.com/pypa/setuptools/blob/master/setuptools/command/test.py
Change-Id: I5b68f03e782fef5c45424c04cc851be5988f9019
Diffstat (limited to 'tox.ini')
-rw-r--r-- | tox.ini | 4 |
1 files changed, 2 insertions, 2 deletions
@@ -13,7 +13,7 @@ setenv = deps = . -r{toxinidir}/test-requirements.txt commands = - python setup.py testr --testr-args='{posargs}' + python setup.py test --testr-args='{posargs}' [tox:jenkins] sitepackages = True @@ -26,7 +26,7 @@ commands = python setup.py build_sphinx [testenv:cover] commands = - python setup.py testr --coverage + python setup.py test --coverage [testenv:venv] commands = {posargs} |