Skip to content

Commit a74d406

Browse files
Add tests
1 parent da0e49e commit a74d406

File tree

2 files changed

+14
-2
lines changed

2 files changed

+14
-2
lines changed

src/anaconda/test-project/test-utils.sh

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -171,3 +171,11 @@ checkPythonPackageVersion()
171171
current_version=$(python -c "import ${PACKAGE}; print(${PACKAGE}.__version__)")
172172
check-version-ge "${PACKAGE}-requirement" "${current_version}" "${REQUIRED_VERSION}"
173173
}
174+
175+
checkCondaPackageVersion()
176+
{
177+
PACKAGE=$1
178+
REQUIRED_VERSION=$2
179+
current_version=$(conda list "${PACKAGE}" | grep -E "^${PACKAGE}\s" | awk '{print $2}')
180+
check-version-ge "conda-${PACKAGE}-requirement" "${current_version}" "${REQUIRED_VERSION}"
181+
}

src/anaconda/test-project/test.sh

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -46,9 +46,13 @@ checkPythonPackageVersion "requests" "2.31.0"
4646
tornado_version=$(python -c "import tornado; print(tornado.version)")
4747
check-version-ge "tornado-requirement" "${tornado_version}" "6.3.2"
4848

49+
checkCondaPackageVersion "pyopenssl" "23.2.0"
50+
checkCondaPackageVersion "cryptography" "41.0.2"
51+
checkCondaPackageVersion "requests" "2.31.0"
52+
4953
check "conda-update-conda" bash -c "conda update -y conda"
50-
check "conda-install" bash -c "conda install -c conda-forge --yes tensorflow"
51-
check "conda-install" bash -c "conda install -c conda-forge --yes pytorch"
54+
check "conda-install-tensorflow" bash -c "conda install -c conda-forge --yes tensorflow"
55+
check "conda-install-pytorch" bash -c "conda install -c conda-forge --yes pytorch"
5256

5357
# Report result
5458
reportResults

0 commit comments

Comments
 (0)