Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(206)

Side by Side Diff: bootstrap/virtualenv/tests/test_cmdline.py

Issue 2043213002: Roll virtualenv 12.0->15.0.2 (Closed) Base URL: https://chromium.googlesource.com/infra/infra.git@master
Patch Set: vendor virtualenv and exclude from gender check Created 4 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
(Empty)
1 import sys
2 import subprocess
3 import virtualenv
4 import pytest
5
6 VIRTUALENV_SCRIPT = virtualenv.__file__
7
8 def test_commandline_basic(tmpdir):
9 """Simple command line usage should work"""
10 subprocess.check_call([
11 sys.executable,
12 VIRTUALENV_SCRIPT,
13 str(tmpdir.join('venv'))
14 ])
15
16 def test_commandline_explicit_interp(tmpdir):
17 """Specifying the Python interpreter should work"""
18 subprocess.check_call([
19 sys.executable,
20 VIRTUALENV_SCRIPT,
21 '-p', sys.executable,
22 str(tmpdir.join('venv'))
23 ])
24
25 # The registry lookups to support the abbreviated "-p 3.5" form of specifying
26 # a Python interpreter on Windows don't seem to work with Python 3.5. The
27 # registry layout is not well documented, and it's not clear that the feature
28 # is sufficiently widely used to be worth fixing.
29 # See https://github.com/pypa/virtualenv/issues/864
30 @pytest.mark.skipif("sys.platform == 'win32' and sys.version_info[:2] >= (3,5)")
31 def test_commandline_abbrev_interp(tmpdir):
32 """Specifying abbreviated forms of the Python interpreter should work"""
33 if sys.platform == 'win32':
34 fmt = '%s.%s'
35 else:
36 fmt = 'python%s.%s'
37 abbrev = fmt % (sys.version_info[0], sys.version_info[1])
38 subprocess.check_call([
39 sys.executable,
40 VIRTUALENV_SCRIPT,
41 '-p', abbrev,
42 str(tmpdir.join('venv'))
43 ])
44
OLDNEW
« no previous file with comments | « bootstrap/virtualenv/tests/test_activate_output.expected ('k') | bootstrap/virtualenv/tests/test_virtualenv.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698