Browse Source

Merge "Python 2.7 environment, mimicking the one used by RDO"

changes/32/794732/1
Zuul 1 week ago
committed by Gerrit Code Review
parent
commit
3a087532e6
1 changed files with 23 additions and 0 deletions
  1. +23
    -0
      tox.ini

+ 23
- 0
tox.ini View File

@ -42,6 +42,29 @@ deps =
-r {toxinidir}/doc/requirements.txt
whitelist_externals = bash
[testenv:py27]
envtmpdir={envdir}/tmp
skip_install = true
commands_pre =
cp -r {toxinidir}/validations_common {envtmpdir}/validations_common
touch {envtmpdir}/validations_common/library/__init__.py
find {envtmpdir}/validations_common/tests/ -type f -exec sed -i -e 's/from unittest import mock/import mock/g' \{\} ;
find {envtmpdir}/validations_common/tests/ -type f -exec sed -i -e 's/from unittest.mock/from mock/g' \{\} ;
find {envtmpdir} -type f -name 'setup.cfg' -exec sed -i -e 's/python-requires = >=3.6/python-requires = >=2.7/g' \{\} ;
commands =
python2.7 -m unittest discover -s {envtmpdir}/validations_common/tests
deps =
-c {env:TOX_CONSTRAINTS_FILE:https://opendev.org/openstack/requirements/raw/branch/stable/train/upper-constraints.txt}
-r {toxinidir}/requirements.txt
-r {toxinidir}/test-requirements.txt
ansible>=2
whitelist_externals =
bash
cp
find
sed
touch
[testenv:bindep]
# Do not install any requirements. We want this to be fast and work even if
# system dependencies are missing, since it's used to tell you what system


Loading…
Cancel
Save