Skip to content

Commit d4c3fef

Browse files
authored
Add pytest to Python Feature (devcontainers#487)
* Update install.sh * Update install_additional_python.sh * Update install_os_provided_python.sh * Update install_via_oryx.sh * Update test.sh * Update devcontainer-feature.json
1 parent 1449f41 commit d4c3fef

6 files changed

Lines changed: 12 additions & 4 deletions

File tree

src/python/devcontainer-feature.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"id": "python",
3-
"version": "1.0.21",
3+
"version": "1.0.22",
44
"name": "Python",
55
"documentationURL": "https://github.com/devcontainers/features/tree/main/src/python",
66
"description": "Installs the provided version of Python, as well as PIPX, and other common Python utilities. JupyterLab is conditionally installed with the python feature. Note: May require source code compilation.",

src/python/install.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ CONFIGURE_JUPYTERLAB_ALLOW_ORIGIN="${CONFIGUREJUPYTERLABALLOWORIGIN:-""}"
2626
# alongside PYTHON_VERSION, but not set as default.
2727
ADDITIONAL_VERSIONS="${ADDITIONALVERSIONS:-""}"
2828

29-
DEFAULT_UTILS=("pylint" "flake8" "autopep8" "black" "yapf" "mypy" "pydocstyle" "pycodestyle" "bandit" "pipenv" "virtualenv")
29+
DEFAULT_UTILS=("pylint" "flake8" "autopep8" "black" "yapf" "mypy" "pydocstyle" "pycodestyle" "bandit" "pipenv" "virtualenv" "pytest")
3030
PYTHON_SOURCE_GPG_KEYS="64E628F8D684696D B26995E310250568 2D347EA6AA65421D FB9921286F5E1540 3A5CA953F73C700D 04C367C218ADD4FF 0EDDC5F26A45C816 6AF053F07D9DC8D2 C9BE28DEE6DF025C 126EB563A74B06BF D9866941EA5BBD71 ED9D77D5"
3131
GPG_KEY_SERVERS="keyserver hkp://keyserver.ubuntu.com
3232
keyserver hkps://keys.openpgp.org

test/python/install_additional_python.sh

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@ check "mypy" mypy --version
2121
check "pycodestyle" pycodestyle --version
2222
check "pydocstyle" pydocstyle --version
2323
check "pylint" pylint --version
24+
check "pytest" pytest --version
2425

2526
# Check paths in settings
2627
check "current symlink is correct" bash -c "which python | grep /usr/local/python/current/bin/python"
@@ -34,6 +35,7 @@ check "which mypy" bash -c "which mypy | grep /usr/local/py-utils/bin/mypy"
3435
check "which pycodestyle" bash -c "which pycodestyle | grep /usr/local/py-utils/bin/pycodestyle"
3536
check "which pydocstyle" bash -c "which pydocstyle | grep /usr/local/py-utils/bin/pydocstyle"
3637
check "which pylint" bash -c "which pylint | grep /usr/local/py-utils/bin/pylint"
38+
check "which pytest" bash -c "which pytest | grep /usr/local/py-utils/bin/pytest"
3739

3840
# Report result
3941
reportResults

test/python/install_os_provided_python.sh

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@ check "mypy" mypy --version
2020
check "pycodestyle" pycodestyle --version
2121
check "pydocstyle" pydocstyle --version
2222
check "pylint" pylint --version
23+
check "pytest" pytest --version
2324

2425
# Check paths in settings
2526
check "current symlink is correct" bash -c "which python | grep /usr/local/python/current/bin/python"
@@ -33,6 +34,7 @@ check "which mypy" bash -c "which mypy | grep /usr/local/py-utils/bin/mypy"
3334
check "which pycodestyle" bash -c "which pycodestyle | grep /usr/local/py-utils/bin/pycodestyle"
3435
check "which pydocstyle" bash -c "which pydocstyle | grep /usr/local/py-utils/bin/pydocstyle"
3536
check "which pylint" bash -c "which pylint | grep /usr/local/py-utils/bin/pylint"
37+
check "which pytest" bash -c "which pytest | grep /usr/local/py-utils/bin/pytest"
3638

3739
# Report result
38-
reportResults
40+
reportResults

test/python/install_via_oryx.sh

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@ check "mypy" mypy --version
2020
check "pycodestyle" pycodestyle --version
2121
check "pydocstyle" pydocstyle --version
2222
check "pylint" pylint --version
23+
check "pytest" pytest --version
2324

2425
# Check paths in settings
2526
check "current symlink is correct" bash -c "which python | grep /usr/local/python/current/bin/python"
@@ -33,6 +34,7 @@ check "which mypy" bash -c "which mypy | grep /usr/local/py-utils/bin/mypy"
3334
check "which pycodestyle" bash -c "which pycodestyle | grep /usr/local/py-utils/bin/pycodestyle"
3435
check "which pydocstyle" bash -c "which pydocstyle | grep /usr/local/py-utils/bin/pydocstyle"
3536
check "which pylint" bash -c "which pylint | grep /usr/local/py-utils/bin/pylint"
37+
check "which pytest" bash -c "which pytest | grep /usr/local/py-utils/bin/pytest"
3638

3739
# Report result
38-
reportResults
40+
reportResults

test/python/test.sh

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@ check "mypy" mypy --version
2020
check "pycodestyle" pycodestyle --version
2121
check "pydocstyle" pydocstyle --version
2222
check "pylint" pylint --version
23+
check "pytest" pytest --version
2324

2425
# Check paths in settings
2526
check "current symlink is correct" bash -c "which python | grep /usr/local/python/current/bin/python"
@@ -33,6 +34,7 @@ check "which mypy" bash -c "which mypy | grep /usr/local/py-utils/bin/mypy"
3334
check "which pycodestyle" bash -c "which pycodestyle | grep /usr/local/py-utils/bin/pycodestyle"
3435
check "which pydocstyle" bash -c "which pydocstyle | grep /usr/local/py-utils/bin/pydocstyle"
3536
check "which pylint" bash -c "which pylint | grep /usr/local/py-utils/bin/pylint"
37+
check "which pytest" bash -c "which pytest | grep /usr/local/py-utils/bin/pytest"
3638

3739
# Report result
3840
reportResults

0 commit comments

Comments
 (0)