[Tests] Fix tox, pytest and travis issues

* Error occurring with Pytest 5.4 so pin to below that version.
 * Fix minor issues with Travis config.
 * Use full command-switches for pytest in tox config.
 * Remove pin for pip as issue with pip-wheel-metadata was fixed in 19.3
 * Remove tox-venv as causing issues of incompatible packages installed.
   The latest versions of the virtualenv package should handle these
   duties.
This commit is contained in:
Calum Lind 2020-04-11 18:56:46 +01:00
commit eb57412601
5 changed files with 7 additions and 8 deletions

View file

@ -1,5 +1,5 @@
os: linux
dist: xenial dist: xenial
sudo: required
language: python language: python
python: python:
@ -17,7 +17,7 @@ git:
# Set greater depth to get version from tags. # Set greater depth to get version from tags.
depth: 1000 depth: 1000
matrix: jobs:
include: include:
- name: Unit tests - name: Unit tests
env: TOX_ENV=py3 env: TOX_ENV=py3
@ -58,7 +58,7 @@ addons:
# Install dependencies # Install dependencies
install: install:
- pip install tox tox-venv - pip install tox
# GTKUI tests # GTKUI tests
- "if [ $TOX_ENV == 'gtkui' ]; then - "if [ $TOX_ENV == 'gtkui' ]; then
sudo apt install python3-gi python3-gi-cairo gir1.2-gtk-3.0; sudo apt install python3-gi python3-gi-cairo gir1.2-gtk-3.0;

View file

@ -17,7 +17,7 @@ system.
#### Build tools #### Build tools
sudo apt install git intltool closure-compiler python3-pip sudo apt install git intltool closure-compiler python3-pip
pip3 install --user tox tox-venv pip3 install --user tox
You might need to add `~/.local/bin` to your PATH. You might need to add `~/.local/bin` to your PATH.

View file

@ -3,7 +3,6 @@
-r requirements-tests.txt -r requirements-tests.txt
sphinx-autobuild sphinx-autobuild
tox tox
tox-venv
pre-commit pre-commit
flake8-blind-except flake8-blind-except
flake8-builtins flake8-builtins

View file

@ -1,4 +1,4 @@
pytest != 5.2.3 pytest != 5.2.3, < 5.4
pytest-twisted pytest-twisted
pytest-cov pytest-cov
mock mock

View file

@ -18,7 +18,7 @@ addopts = -p no:warnings --basetemp=_pytest_temp
[basesetup] [basesetup]
# Minimum pip and setuptools versions to fix system and travis issues. # Minimum pip and setuptools versions to fix system and travis issues.
deps = deps =
pip >= 10, <= 18.1 pip >= 10
setuptools >= 40 setuptools >= 40
[basetests] [basetests]
@ -53,7 +53,7 @@ install_command = python -m pip install --ignore-installed {opts} {packages}
passenv = DISPLAY PYTHONPATH passenv = DISPLAY PYTHONPATH
setenv = setenv =
PYTHONPATH = {toxinidir} PYTHONPATH = {toxinidir}
PYTEST_ADDOPTS = -v -s PYTEST_ADDOPTS = --verbose --capture=no
sitepackages = True sitepackages = True
deps = {[basetests]deps} deps = {[basetests]deps}
commands = commands =