switch to stestr; fix tox.ini

Signed-off-by: Doug Hellmann <doug@doughellmann.com>
This commit is contained in:
Doug Hellmann 2018-04-26 14:53:15 -04:00
parent cff78c527e
commit ba465598ef
6 changed files with 28 additions and 10 deletions

5
.gitignore vendored Normal file
View File

@ -0,0 +1,5 @@
/.stestr
/.tox
/AUTHORS
/ChangeLog
/*.egg-info

3
.stestr.conf Normal file
View File

@ -0,0 +1,3 @@
[DEFAULT]
test_path=./git_nit/tests
top_dir=./

View File

@ -8,9 +8,7 @@
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
# implied.
#
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.

View File

View File

@ -1,6 +1,8 @@
hacking>=0.10.0,<0.11
mock
fixtures>=0.3.14
testrepository>=0.0.18
testtools>=0.9.34
sphinx>=1.1.2,!=1.2.0
coverage
python-subunit>=1.0.0 # Apache-2.0/BSD
stestr>=1.0.0 # Apache-2.0

22
tox.ini
View File

@ -1,5 +1,5 @@
[tox]
envlist = py27,py35,pep8
envlist = py35,py27,pep8
[testenv]
basepython = python3
@ -7,9 +7,11 @@ install_command = pip install -U {opts} {packages}
setenv =
VIRTUAL_ENV={envdir}
commands =
python setup.py test --coverage --coverage-package-name=git_nit --slowest --testr-args='{posargs}'
coverage report --show-missing
commands = stestr run {posargs}
stestr slowest
# commands =
# python setup.py test --coverage --coverage-package-name=git_nit --slowest --testr-args='{posargs}'
# coverage report --show-missing
deps =
-r{toxinidir}/requirements.txt
@ -20,9 +22,17 @@ basepython = python2.7
[testenv:pep8]
commands = flake8
skip_install = True
[testenv:sdist]
commands = python setup.py sdist {posargs}
[testenv:cover]
setenv =
{[testenv]setenv}
PYTHON=coverage run --source shade --parallel-mode
commands =
stestr run {posargs}
coverage combine
coverage html -d cover
coverage xml -o cover/coverage.xml
[testenv:docs]
commands = python setup.py build_sphinx