aboutsummaryrefslogtreecommitdiff
path: root/test/python
diff options
context:
space:
mode:
Diffstat (limited to 'test/python')
-rw-r--r--test/python/install_additional_python.sh14
-rw-r--r--test/python/install_jupyterlab.sh16
-rw-r--r--test/python/install_os_provided_python.sh16
-rw-r--r--test/python/scenarios.json31
4 files changed, 77 insertions, 0 deletions
diff --git a/test/python/install_additional_python.sh b/test/python/install_additional_python.sh
new file mode 100644
index 0000000..b0393d3
--- /dev/null
+++ b/test/python/install_additional_python.sh
@@ -0,0 +1,14 @@
+#!/bin/bash
+
+set -e
+
+# Optional: Import test library
+source dev-container-features-test-lib
+
+check "python version 3.10.5 installed as default" python --version | grep 3.10.5
+check "python3 version 3.10.5 installed as default" python3 --version | grep 3.10.5
+check "python version 3.8.13 installed" ls -l /usr/local/python | grep 3.8.13
+check "python version 3.9.13 installed" ls -l /usr/local/python | grep 3.9.13
+
+# Report result
+reportResults
diff --git a/test/python/install_jupyterlab.sh b/test/python/install_jupyterlab.sh
new file mode 100644
index 0000000..9c5e453
--- /dev/null
+++ b/test/python/install_jupyterlab.sh
@@ -0,0 +1,16 @@
+#!/bin/bash
+
+set -e
+
+# Optional: Import test library
+source dev-container-features-test-lib
+
+check "version" jupyter lab --version
+check "config" grep ".*.allow_origin = '*'" /home/vscode/.jupyter/jupyter_notebook_config.py
+
+check "user" whoami | grep vscode
+check "zsh" zsh --version
+check "wget" wget -V
+
+# Report result
+reportResults
diff --git a/test/python/install_os_provided_python.sh b/test/python/install_os_provided_python.sh
new file mode 100644
index 0000000..50a617e
--- /dev/null
+++ b/test/python/install_os_provided_python.sh
@@ -0,0 +1,16 @@
+#!/bin/bash
+
+set -e
+
+# Optional: Import test library
+source dev-container-features-test-lib
+
+check "python3 is installed" python3 --version
+check "python is installed" python --version
+check "pip is installed" pip --version
+check "pip is installed" pip3 --version
+
+check "node is installed" node --version
+
+# Report result
+reportResults \ No newline at end of file
diff --git a/test/python/scenarios.json b/test/python/scenarios.json
new file mode 100644
index 0000000..2aa246f
--- /dev/null
+++ b/test/python/scenarios.json
@@ -0,0 +1,31 @@
+{
+ "install_additional_python": {
+ "image": "ubuntu:focal",
+ "features": {
+ "python": {
+ "version": "3.10.5",
+ "additionalVersions": "3.8,3.9.13"
+ }
+ }
+ },
+ "install_jupyterlab": {
+ "image": "mcr.microsoft.com/vscode/devcontainers/base:focal",
+ "remoteUser": "vscode",
+ "features": {
+ "common-utils": {
+ "username": "vscode"
+ },
+ "python": {
+ "installJupyterlab": true,
+ "configureJupyterlabAllowOrigin": "*"
+ }
+ }
+ },
+ "install_os_provided_python": {
+ "image": "mcr.microsoft.com/devcontainers/base:0-bullseye",
+ "features": {
+ "node": "latest",
+ "python": "os-provided"
+ }
+ }
+} \ No newline at end of file