summaryrefslogtreecommitdiff
path: root/Lib/test/test_venv.py
diff options
context:
space:
mode:
author?ric Araujo <merwok@netwok.org>2012-06-24 13:51:22 -0400
committer?ric Araujo <merwok@netwok.org>2012-06-24 13:51:22 -0400
commitb518cfd3a48d96836c27778c6f1f93b535a6e349 (patch)
treeb8c2a55ea769eab8139a9475981d15988bd39062 /Lib/test/test_venv.py
parent2e7ba99e8b186a14d219dd45b1a336ecd05054af (diff)
downloadcpython-b518cfd3a48d96836c27778c6f1f93b535a6e349.tar.gz
Restore test that was using pysetup and can now (#15157) use pydoc
Diffstat (limited to 'Lib/test/test_venv.py')
-rw-r--r--Lib/test/test_venv.py4
1 files changed, 4 insertions, 0 deletions
diff --git a/Lib/test/test_venv.py b/Lib/test/test_venv.py
index 1188d93945..45a29873f8 100644
--- a/Lib/test/test_venv.py
+++ b/Lib/test/test_venv.py
@@ -21,10 +21,12 @@ class BaseTest(unittest.TestCase):
self.env_dir = tempfile.mkdtemp()
if os.name == 'nt':
self.bindir = 'Scripts'
+ self.pydocname = 'pydoc.py'
self.lib = ('Lib',)
self.include = 'Include'
else:
self.bindir = 'bin'
+ self.pydocname = 'pydoc'
self.lib = ('lib', 'python%s' % sys.version[:3])
self.include = 'include'
if sys.platform == 'darwin' and '__PYTHONV_LAUNCHER__' in os.environ:
@@ -74,6 +76,8 @@ class BasicTest(BaseTest):
executable = sys.executable
path = os.path.dirname(executable)
self.assertIn('home = %s' % path, data)
+ data = self.get_text_file_contents(self.bindir, self.pydocname)
+ self.assertTrue(data.startswith('#!%s%s' % (self.env_dir, os.sep)))
fn = self.get_env_file(self.bindir, self.exe)
if not os.path.exists(fn): # diagnostics for Windows buildbot failures
bd = self.get_env_file(self.bindir)