From 4f9db4e5b334870f48b531e936905805278ce695 Mon Sep 17 00:00:00 2001 From: Yuming Zhu Date: Jan 07 2025 08:38:31 +0000 Subject: combination of test-requirments(-py2).txt --- diff --git a/docs/source/writing_koji_code.rst b/docs/source/writing_koji_code.rst index 3602896..a6f3a83 100644 --- a/docs/source/writing_koji_code.rst +++ b/docs/source/writing_koji_code.rst @@ -749,7 +749,7 @@ For py2 instances: * ``python-psycopg2`` * ``tox`` * ``pip==9.0.1`` - * ``Other packages are installed by test-requirements-py2.txt.`` + * ``Other packages are installed by test-requirements.txt.`` You can use containers for the tests. Dockerfiles are placed in `devtools/containers` directory. Supported Dockerfiles: diff --git a/test-requirements-py2.txt b/test-requirements-py2.txt deleted file mode 100644 index d10c071..0000000 --- a/test-requirements-py2.txt +++ /dev/null @@ -1,10 +0,0 @@ --e . -flake8 -flake8-import-order -mock<=2.0.0 -requests-mock<1.11.0 -coverage -pytest -Cheetah -python-multilib -python-qpid-proton<0.38.0 \ No newline at end of file diff --git a/test-requirements.txt b/test-requirements.txt index 91ed887..848977e 100644 --- a/test-requirements.txt +++ b/test-requirements.txt @@ -1,14 +1,10 @@ -e . -defusedxml -flake8 -flake8-import-order -requests-mock +-r requirements.txt +mock<=2.0.0;python_version < '3.3' +requests-mock;python_version >= '3.0' +requests-mock<1.11.0;python_version < '3.0' coverage pytest -pytest-cov -pytest-xdist -Cheetah3 -psycopg2-binary -python-multilib -python-qpid-proton -setuptools +pytest-cov;python_version >= '3.0' +pytest-xdist;python_version >= '3.0' +setuptools;python_version >= '3.0' diff --git a/tox.ini b/tox.ini index 4cb79cb..2ceede7 100644 --- a/tox.ini +++ b/tox.ini @@ -4,6 +4,7 @@ envlist = flake8,py2,py3,bandit [testenv:flake8] deps = flake8 + flake8-import-order # On EL6, pip would get us a flake8 that doesn't work with python2.6. The next # two lines let us use an RPM-based version from EPEL if it is installed sitepackages = true @@ -47,7 +48,7 @@ commands = [testenv:py2] deps = - -r{toxinidir}/test-requirements-py2.txt + -r{toxinidir}/test-requirements.txt setenv = {[testenv]setenv} PYTHONPATH=.:plugins/builder/.:plugins/cli/.:cli/.:www/lib @@ -71,7 +72,7 @@ commands = # dependencies must be installed. [testenv:py2-rpmdeps] deps = - -r{toxinidir}/test-requirements-py2.txt + -r{toxinidir}/test-requirements.txt setenv = {[testenv:py2]setenv} commands_pre =