mirror of
https://github.com/linux-system-roles/network.git
synced 2026-01-23 02:15:17 +00:00
python 2.6 support for pytest and ansible 2.6
Removed `mock` from the `testenv` `deps`. Added `mock` to the template pytest_extra_requirements.txt, commented out. Projects such as network that need it can uncomment it.
This commit is contained in:
parent
7fdfa3204e
commit
92519644ba
4 changed files with 20 additions and 1 deletions
|
|
@ -20,6 +20,11 @@ if lsr_venv_python_matches_system_python; then
|
|||
LSR_EXTRA_PACKAGES='python3-selinux'
|
||||
fi
|
||||
|
||||
# extra packages needed with python 2.6 and ansible 2.6
|
||||
if lsr_check_python_version python -lt 2.7 ; then
|
||||
LSR_EXTRA_PACKAGES="$LSR_EXTRA_PACKAGES libffi-dev libssl-dev"
|
||||
fi
|
||||
|
||||
. ${SCRIPTDIR}/config.sh
|
||||
|
||||
# Install extra dependencies.
|
||||
|
|
|
|||
7
ansible_pytest_extra_requirements.txt
Normal file
7
ansible_pytest_extra_requirements.txt
Normal file
|
|
@ -0,0 +1,7 @@
|
|||
# SPDX-License-Identifier: MIT
|
||||
|
||||
# ansible and dependencies for all supported platforms
|
||||
ansible ; python_version > "2.6"
|
||||
ansible<2.7 ; python_version < "2.7"
|
||||
idna<2.8 ; python_version < "2.7"
|
||||
PyYAML<5.1 ; python_version < "2.7"
|
||||
7
pytest_extra_requirements.txt
Normal file
7
pytest_extra_requirements.txt
Normal file
|
|
@ -0,0 +1,7 @@
|
|||
# SPDX-License-Identifier: MIT
|
||||
|
||||
# Write extra requirements for running pytest here:
|
||||
# If you need ansible then uncomment the following line:
|
||||
#-ransible_pytest_extra_requirements.txt
|
||||
# If you need mock then uncomment the following line:
|
||||
mock ; python_version < "3.0"
|
||||
2
tox.ini
2
tox.ini
|
|
@ -13,8 +13,8 @@ basepython = python3
|
|||
deps =
|
||||
py{26,27,36,37,38}: pytest-cov
|
||||
py{27,36,37,38}: pytest>=3.5.1
|
||||
py{26,27}: mock
|
||||
py26: pytest
|
||||
py{26,27,36,37,38}: -rpytest_extra_requirements.txt
|
||||
|
||||
[base]
|
||||
passenv = *
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue