From f981682bdc0ca0235d04629c358643be610a860d Mon Sep 17 00:00:00 2001 From: Massimiliano Culpo Date: Thu, 18 Nov 2021 15:08:59 +0100 Subject: Allow recent pytest versions to be used with Spack (#25371) Currently Spack vendors `pytest` at a version which is three major versions behind the latest (3.2.5 vs. 6.2.4). We do that since v3.2.5 is the latest version supporting Python 2.6. Remaining so much behind the currently supported versions though might introduce some incompatibilities and is surely a technical debt. This PR modifies Spack to: - Use the vendored `pytest@3.2.5` only as a fallback solution, if the Python interpreter used for Spack doesn't provide a newer one - Be able to parse `pytest --collect-only` in all the different output formats from v3.2.5 to v6.2.4 and use it consistently for `spack unit-test --list-*` - Updating the unit tests in Github Actions to use a more recent `pytest` version --- lib/spack/docs/conf.py | 1 + 1 file changed, 1 insertion(+) (limited to 'lib/spack/docs/conf.py') diff --git a/lib/spack/docs/conf.py b/lib/spack/docs/conf.py index 2b58223e1d..d0a2bb9e33 100644 --- a/lib/spack/docs/conf.py +++ b/lib/spack/docs/conf.py @@ -30,6 +30,7 @@ from sphinx.ext.apidoc import main as sphinx_apidoc # add these directories to sys.path here. If the directory is relative to the # documentation root, use os.path.abspath to make it absolute, like shown here. sys.path.insert(0, os.path.abspath('_spack_root/lib/spack/external')) +sys.path.insert(0, os.path.abspath('_spack_root/lib/spack/external/pytest-fallback')) if sys.version_info[0] < 3: sys.path.insert( -- cgit v1.2.3-70-g09d2