15 lines
680 B
Python
15 lines
680 B
Python
from pathlib import Path
|
|
|
|
|
|
def test_fnos_dependency_download_uses_fast_configurable_index() -> None:
|
|
script = (Path(__file__).parents[1] / "scripts" / "prepare-fnos-dependencies.sh").read_text()
|
|
assert "PIP_INDEX_URL=${PIP_INDEX_URL:-https://pypi.tuna.tsinghua.edu.cn/simple}" in script
|
|
assert '--index-url "$PIP_INDEX_URL"' in script
|
|
assert '--timeout "$PIP_TIMEOUT" --retries 4' in script
|
|
|
|
|
|
def test_jenkins_uses_fast_index_for_every_pip_stage() -> None:
|
|
pipeline = (Path(__file__).parents[1] / "Jenkinsfile").read_text()
|
|
assert "PIP_INDEX_URL = 'https://pypi.tuna.tsinghua.edu.cn/simple'" in pipeline
|
|
assert "PIP_DEFAULT_TIMEOUT = '60'" in pipeline
|