diff options
author | Jurko Gospodnetić <jurko.gospodnetic@pke.hr> | 2018-12-16 20:55:58 +0100 |
---|---|---|
committer | Bernát Gábor <gaborjbernat@gmail.com> | 2018-12-16 19:55:58 +0000 |
commit | b3e55b126f227ee83d1588b4da4915d28eefff54 (patch) | |
tree | 40535784aec96be68b165fa9f0518c84e3b0282b | |
parent | 616a0e60308533e8ab58b0a3eb85053f33f167e4 (diff) | |
download | virtualenv-b3e55b126f227ee83d1588b4da4915d28eefff54.tar.gz |
update testing notes, and test space path support
- added docs on running the internal test suite using `tox`
- added a test for creating a Python environment in a path with spaces
- added a test for creating a Python environment while locating the needed wheel sources in a path with spaces
-rw-r--r-- | docs/development.rst | 13 | ||||
-rw-r--r-- | tests/test_virtualenv.py | 17 |
2 files changed, 30 insertions, 0 deletions
diff --git a/docs/development.rst b/docs/development.rst index ea216ea..b7640a3 100644 --- a/docs/development.rst +++ b/docs/development.rst @@ -46,6 +46,19 @@ Or select just a single test file to run:: $ pytest tests/test_virtualenv +You can also run the tests using ``tox`` which will take care of installing all +the necessary requirements into its constructed Python environments. You just +need to install ``tox`` in your environment using:: + + $ python -m pip install tox + +and then run the tests with a specific Python version using a call like:: + + $ python -m tox -e python3.6 + +Run ``python -m tox -av`` for a list of all supported Python environments or just run the +tests in all of the available ones by running just ``tox``. + Status and License ------------------ diff --git a/tests/test_virtualenv.py b/tests/test_virtualenv.py index 9505b0d..fa1f74d 100644 --- a/tests/test_virtualenv.py +++ b/tests/test_virtualenv.py @@ -376,3 +376,20 @@ def test_missing_certifi_pem(tmp_path): venvdir = tmp_path / "venv" search_dirs = [str(wheeldir), str(support_original)] virtualenv.create_environment(str(venvdir), search_dirs=search_dirs) + + +def test_create_environment_from_dir_with_spaces(tmpdir): + """Should work with wheel sources read from a dir with spaces.""" + ve_path = str(tmpdir / "venv") + spaced_support_dir = str(tmpdir / "support with spaces") + from virtualenv_support import __file__ as support_dir + + support_dir = os.path.dirname(os.path.abspath(support_dir)) + shutil.copytree(support_dir, spaced_support_dir) + virtualenv.create_environment(ve_path, search_dirs=[spaced_support_dir]) + + +def test_create_environment_in_dir_with_spaces(tmpdir): + """Should work with environment path containing spaces.""" + ve_path = str(tmpdir / "venv with spaces") + virtualenv.create_environment(ve_path) |