Skip to content

ci: make `test_pipeline.py` run with Python 3.6 and 3.7

As shown in the CI job https://gitlab.desy.de/asapo/asapo/-/jobs/526067#L89, the file tests/automatic/pytests/conftest.py contained code that is not accepted by Python 3.6:

$ $python_bin -m pytest  test_pipeline.py --token-path standalone_token.txt -vv -o log_cli=true --log-cli-level=DEBUG $PYTEST_KEY
ImportError while loading conftest '/builds/asapo/asapo/tests/automatic/pytests/conftest.py'.
/opt/python/cp36-cp36m/lib/python3.6/ast.py:35: in parse
    return compile(source, filename, mode, PyCF_ONLY_AST)
E     File "/builds/asapo/asapo/tests/automatic/pytests/conftest.py", line 8
E       if build_dir_env := os.environ.get("BUILD_DIR"):
E                         ^
E   SyntaxError: invalid syntax
Edited by Marc-Olivier Andrez

Merge request reports

Loading