From 9fcc286702e2960120d46f158bf0916031aa6a4e Mon Sep 17 00:00:00 2001 From: Sorin Sbarnea Date: Fri, 14 Aug 2020 16:45:59 +0100 Subject: [PATCH] Reorganize test requirements - Move test requirements from tox.ini to a test extra - Removes unused test requirements - Pin-down incompatible pytest-xdist<2.0.0 due to https://github.com/pytest-dev/pytest-cov/issues/422 - Bumps test requirements to decrease change of running outdated version while developing. --- setup.cfg | 10 ++++++++++ tox.ini | 11 ++--------- 2 files changed, 12 insertions(+), 9 deletions(-) diff --git a/setup.cfg b/setup.cfg index f6f62b59f6..8e933efc01 100644 --- a/setup.cfg +++ b/setup.cfg @@ -77,6 +77,16 @@ install_requires = # NOTE: per issue #509 0.15.34 included in debian backports typing-extensions; python_version < "3.8" +[options.extras_require] +test = + pytest >= 6.0.1 + pytest-cov >= 2.10.0 + # https://github.com/pytest-dev/pytest-cov/issues/422 + pytest-xdist >= 1.34.0,<2.0.0 + # Needed to avoid DeprecationWarning errors in pytest: + setuptools >= 40.4.3 + wheel >= 0.35.0 + [options.entry_points] console_scripts = ansible-lint = ansiblelint.__main__:main diff --git a/tox.ini b/tox.ini index 6c5a1eaebc..6c879783fa 100644 --- a/tox.ini +++ b/tox.ini @@ -20,15 +20,8 @@ deps = # https://github.com/ansible/ansible/issues/70705 ansibledevel: ansible>=2.10.0a1,<2.11 ansibledevel: ansible-base @ git+https://github.com/ansible/ansible.git - ruamel.yaml==0.16.5 # NOTE: 0.15.34 has issues with py37 - flake8 - pep8-naming - pytest - pytest-cov - pytest-xdist - # Needed to avoid DeprecationWarning errors in pytest: - setuptools >= 40.4.3 - wheel +extras = + test commands = # safety measure to assure we do not accidentaly run tests with broken dependencies python -m pip check