mirror of
https://github.com/jupyter/docker-stacks.git
synced 2025-10-11 03:52:56 +00:00

* Create base-jupyter from base-notebook for non-server jupyter applications * Fix pre-commit errors and begin test refactoring * More test refactoring * Add base-jupyter to images_hierarchy * Use folder work instead of .jupyter in nb-user test * Add base-jupyter to tagging hierarchy * Linting: trailing comma * Apply review comments, remove obsolute Miniforge reference * Add self-signed cert comment back to base-notebook doc * Update docs/using/selecting.md Co-authored-by: Ayaz Salikhov <mathbunnyru@users.noreply.github.com> * Remove redundant apt-get upgrade per review * Remove b/c approaches per review * Move test_nb_user_change back to base-notebook tests, per review * fix linting * Rename base-jupyter to docker-stacks-foundation, per review * Rename tests/base-jupyter to docker-stacks-foundation * Use alphabetical order * Use alphabetical order * Fix markdown style * Split test_nb_user_change between the foundation and base tests Co-authored-by: Ayaz Salikhov <mathbunnyru@users.noreply.github.com>
25 lines
717 B
Python
25 lines
717 B
Python
# Copyright (c) Jupyter Development Team.
|
|
# Distributed under the terms of the Modified BSD License.
|
|
import logging
|
|
|
|
from tests.conftest import TrackedContainer
|
|
|
|
LOGGER = logging.getLogger(__name__)
|
|
EXPECTED_PYTHON_VERSION = "3.10"
|
|
|
|
|
|
def test_python_version(container: TrackedContainer) -> None:
|
|
LOGGER.info(
|
|
f"Checking that python major.minor version is {EXPECTED_PYTHON_VERSION}"
|
|
)
|
|
logs = container.run_and_wait(
|
|
timeout=5,
|
|
tty=True,
|
|
command=["python", "--version"],
|
|
)
|
|
assert logs.startswith("Python ")
|
|
full_version = logs.split()[1]
|
|
major_minor_version = full_version[: full_version.rfind(".")]
|
|
|
|
assert major_minor_version == EXPECTED_PYTHON_VERSION
|