diff --git a/tox.ini b/tox.ini index 9a168e3a5..8bd519c6a 100644 --- a/tox.ini +++ b/tox.ini @@ -25,33 +25,33 @@ extras = matplotlib phonopy-reader brille -commands = {[testenv]test_command} --cov +commands = {[testenv]test_command} --cov -m {[testenv]pytest_additional} # Test with no extras [testenv:py310-base] extras = {[testenv]extras} -commands = {[testenv]test_command} --cov -m "not (phonopy_reader or matplotlib or brille)" +pytest_additional = "not (phonopy_reader or matplotlib or brille)" # Test with matplotlib extra only [testenv:py310-matplotlib] extras = {[testenv]extras} matplotlib -commands = {[testenv]test_command} --cov -m "matplotlib and not multiple_extras" +pytest_additional = "matplotlib and not multiple_extras" # Test with phonopy-reader extra only [testenv:py310-phonopy-reader] extras = {[testenv]extras} phonopy-reader -commands = {[testenv]test_command} --cov -m "phonopy_reader and not multiple_extras" +pytest_additional = "phonopy_reader and not multiple_extras" # Test with brille extra only [testenv:py310-brille] extras = {[testenv]extras} brille -commands = {[testenv]test_command} --cov -m "brille and not multiple_extras" +pytest_additional = "brille and not multiple_extras" # Run remaining tests that require multiple extras [testenv:py310-all] @@ -71,42 +71,22 @@ extras = matplotlib phonopy-reader brille -commands = {[testenv]test_command} -m 'not c_extension' +pytest_additional = "not c_extension" [testenv:py310-minrequirements-linux] -skip_install = True -allowlist_externals = rm -install_command = - python -m pip install --force-reinstall {opts} {packages} -platform = linux -deps = - numpy==1.24.0 - -r{toxinidir}/tests_and_analysis/tox_requirements.txt -commands_pre = - python -m pip install --force-reinstall \ - -r{toxinidir}/tests_and_analysis/minimum_euphonic_requirements.txt - python -m pip install --force-reinstall \ - -r{toxinidir}/tests_and_analysis/tox_requirements.txt - # Force rebuild of euphonic extension to avoid Numpy clash - rm -rf {toxinidir}/build - python -m pip install '{toxinidir}[matplotlib,phonopy-reader,brille]' -commands = {[testenv]test_command} +extras = + -c {toxinidir}/tests_and_analysis/minimum_euphonic_requirements.txt + {[testenv]extras} + matplotlib + phonopy-reader + brille +pytest_additional = "multiple_extras" [testenv:py310-minrequirements-mac] -skip_install = True -allowlist_externals = rm -install_command = - python -m pip install --force-reinstall {opts} {packages} -platform = darwin -deps = - numpy==1.24.0 - -r{toxinidir}/tests_and_analysis/tox_requirements.txt -commands_pre = - python -m pip install --force-reinstall \ - -r{toxinidir}/tests_and_analysis/minimum_euphonic_requirements_mac.txt - python -m pip install --force-reinstall \ - -r{toxinidir}/tests_and_analysis/tox_requirements.txt - # Force rebuild of euphonic extension to avoid Numpy clash - rm -rf {toxinidir}/build - python -m pip install '{toxinidir}[matplotlib,phonopy-reader,brille]' -commands = {[testenv]test_command} +extras = + -c {toxinidir}/tests_and_analysis/minimum_euphonic_requirements_mac.txt + {[testenv]extras} + matplotlib + phonopy-reader + brille +pytest_additional = "multiple_extras"