From 5b5f8fb17684cc1887ff20414d907ff1954572c5 Mon Sep 17 00:00:00 2001 From: David Whiteside Date: Wed, 10 Apr 2024 17:30:53 -0600 Subject: [PATCH] updated readme for specifying python version and added basic unit test --- README.md | 11 +++++++++++ tests/units/test_cli.py | 4 ++++ 2 files changed, 15 insertions(+) diff --git a/README.md b/README.md index f3bef46..09c41de 100644 --- a/README.md +++ b/README.md @@ -38,6 +38,17 @@ Virtual environment loading from /var/folders/4b/dnp21z017cg_rbgfdtzclqlm0000gn/ (tempyenv)(venv) $ echo "now you can pip install in your virtual environment" ``` +To specify a specific version of python +```bash +$ tempyenv -p python3.10 +``` + +or + +```bash +$ python3.10 -m tempyenv +``` + License ======= diff --git a/tests/units/test_cli.py b/tests/units/test_cli.py index 290f22b..3b7f65f 100644 --- a/tests/units/test_cli.py +++ b/tests/units/test_cli.py @@ -17,3 +17,7 @@ def test_create_temporary_directory(self): cli.create_temporary_directory() assert(cli.temp_dir != None) assert(cli.venv_path != None) + + def test_python_exec(self): + cli = TemporaryVenvCreator(python_exec="python_test") + assert(cli.python_exec == "python_test")