Browse Source

Switch to stestr

According to an Openstack summit session [1], stestr is a maintained
project to which all Openstack projects should migrate. Let's switch to
stestr as other projects have already moved to it.

[1] https://etherpad.opendev.org/p/YVR-python-pti

Change-Id: Ie2169026d93ca85337db429c171ff1f82c2fa0d5
changes/46/581546/3 2.3.0
Vu Cong Tuan 4 years ago committed by Pierre Riteau
parent
commit
965f178756
  1. 4
      .gitignore
  2. 4
      .stestr.conf
  3. 7
      .testr.conf
  4. 2
      test-requirements.txt
  5. 11
      tox.ini

4
.gitignore vendored

@ -26,12 +26,10 @@ pip-log.txt
# Unit test / coverage reports
.coverage
.tox
nosetests.xml
.stestr/
# Translations
*.mo
AUTHORS
ChangeLog
.testrepository

4
.stestr.conf

@ -0,0 +1,4 @@
[DEFAULT]
test_path=./blazarnova/tests
top_dir=./

7
.testr.conf

@ -1,7 +0,0 @@
[DEFAULT]
test_command=OS_STDOUT_CAPTURE=${OS_STDOUT_CAPTURE:-1} \
OS_STDERR_CAPTURE=${OS_STDERR_CAPTURE:-1} \
OS_TEST_TIMEOUT=${OS_TEST_TIMEOUT:-60} \
${PYTHON:-python} -m subunit.run discover blazarnova $LISTOPT $IDOPTION
test_id_option=--load-list $IDFILE
test_list_option=--list

2
test-requirements.txt

@ -7,7 +7,7 @@ hacking>=4.0.0,<4.1.0 # Apache-2.0
mock>=3.0.0 # BSD
fixtures>=3.0.0 # Apache-2.0/BSD
testrepository>=0.0.20 # Apache-2.0/BSD
stestr>=2.0.0 # Apache-2.0
testtools>=2.2.0 # MIT
coverage!=4.4,>=4.0 # Apache-2.0
wsgi-intercept>=1.7.0 # MIT License

11
tox.ini

@ -15,11 +15,18 @@ setenv = VIRTUAL_ENV={envdir}
EVENTLET_NO_GREENDNS=yes
PYTHONHASHSEED=0
commands =
python setup.py testr --slowest --testr-args="{posargs}"
stestr run --slowest {posargs}
sitepackages = False
[testenv:cover]
commands = python setup.py testr --coverage --testr-args="{posargs}"
basepython = python3
setenv =
PYTHON=coverage run --source blazarnova --parallel-mode
commands =
stestr run '{posargs}'
coverage combine
coverage html -d cover
coverage xml -o cover/coverage.xml
[testenv:pep8]
commands = flake8 {posargs}

Loading…
Cancel
Save