Files
docker-stacks/tests/docker-stacks-foundation/test_python.py
Bjørn Jørgensen 5bcf21052b Upgrade Python 3.11 (#1844)
* Update Dockerfile

* Update test_python.py

* [TMP] Do not install numba

* test with spark 3.4 rc2

* Update Dockerfile

* install tf with pip in conda

* remove mamba install pip

* Update Dockerfile

---------

Co-authored-by: Ayaz Salikhov <mathbunnyru@gmail.com>
Co-authored-by: Ayaz Salikhov <mathbunnyru@users.noreply.github.com>
2023-06-01 15:26:51 +04:00

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.11"
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