Browse Source

Merge "Python tests are now run trough stestr."

changes/40/780840/1
Zuul 1 year ago committed by Gerrit Code Review
parent
commit
a9e684d5b5
  1. 3
      .stestr.conf
  2. 1
      test-requirements.txt
  3. 2
      tools/validate-files.py
  4. 11
      tox.ini

3
.stestr.conf

@ -0,0 +1,3 @@
[DEFAULT]
test_path=${TEST_PATH:-./tripleo_validations/tests}
top_dir=./

1
test-requirements.txt

@ -14,3 +14,4 @@ testtools>=2.2.0 # MIT
reno>=3.1.0 # Apache-2.0
netaddr>=0.7.18 # BSD
pre-commit # MIT
stestr>=3.0.1 # Apache-2.0

2
tools/validate-files.py

@ -22,7 +22,7 @@ def exit_usage():
def validate_library_file(file_path):
with open(file_path) as f:
with open(file_path, encoding='utf-8') as f:
file_content = f.read()
if 'DOCUMENTATION = ' not in file_content \
or 'EXAMPLES = ' not in file_content:

11
tox.ini

@ -7,7 +7,7 @@ ignore_basepython_conflict = True
[testenv]
basepython = python3
usedevelop = True
passenv = *
passenv = TERM
setenv =
ANSIBLE_CALLBACK_PLUGINS={toxinidir}/callback_plugins
ANSIBLE_LOOKUP_PLUGINS={toxinidir}/lookup_plugins
@ -21,8 +21,13 @@ setenv =
# paramiko CryptographyDeprecationWarning: https://github.com/ansible/ansible/issues/52598
PYTHONWARNINGS=ignore:DEPRECATION::pip._internal.cli.base_command,ignore::UserWarning
PIP_DISABLE_PIP_VERSION_CHECK=1
commands = python setup.py test --slowest --testr-args='{posargs}'
sitepackages = True
PIP_+ VIRTUAL_ENV={envdir}
LANG=en_US.UTF-8
LANGUAGE=en_US:en
LC_ALL=C
HOME={envdir}
commands =
stestr run --slowest --color {posargs}
deps =
-c {env:TOX_CONSTRAINTS_FILE:https://opendev.org/openstack/requirements/raw/branch/master/upper-constraints.txt}
-r {toxinidir}/requirements.txt

Loading…
Cancel
Save