From 81d4cf9e9ea98cefdf9f380b024d627dffb28efb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bern=C3=A1t=20G=C3=A1bor?= Date: Wed, 19 Jun 2024 07:38:03 -0700 Subject: [PATCH] Add test for virtualenv stability (#344) --- pyproject.toml | 1 + tests/test_virtualenv.py | 12 ++++++++++++ tox.ini | 1 + 3 files changed, 14 insertions(+) create mode 100644 tests/test_virtualenv.py diff --git a/pyproject.toml b/pyproject.toml index 1de0f4b..64a2c20 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -54,6 +54,7 @@ optional-dependencies.testing = [ "pytest-cov>=4.1", "pytest-mock>=3.12", "pytest-timeout>=2.2", + "virtualenv>=20.26.2", ] optional-dependencies.typing = [ "typing-extensions>=4.8; python_version<'3.11'", diff --git a/tests/test_virtualenv.py b/tests/test_virtualenv.py new file mode 100644 index 0000000..85c64f8 --- /dev/null +++ b/tests/test_virtualenv.py @@ -0,0 +1,12 @@ +from __future__ import annotations + +from typing import TYPE_CHECKING + +from virtualenv import cli_run + +if TYPE_CHECKING: + from pathlib import Path + + +def test_virtualenv(tmp_path: Path) -> None: + cli_run([str(tmp_path), "--no-pip", "--no-setuptools", "--no-periodic-update"]) diff --git a/tox.ini b/tox.ini index cb6af21..a7520f8 100644 --- a/tox.ini +++ b/tox.ini @@ -107,3 +107,4 @@ extras = commands = python -m pip list --format=columns python -c 'import sys; print(sys.executable)' +uv_seed = true