summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorÉric Araujo <merwok@netwok.org>2012-06-24 17:51:22 (GMT)
committerÉric Araujo <merwok@netwok.org>2012-06-24 17:51:22 (GMT)
commitaa789ace66b8276b7ea55a14168d89b23b558285 (patch)
tree88b5e6c7ea40c3e7ef2e6a8fb1cfe1a54339c9d9
parent318c56c0016fbc0d1825a90f773f0e2cdf3c1e5a (diff)
downloadcpython-aa789ace66b8276b7ea55a14168d89b23b558285.zip
cpython-aa789ace66b8276b7ea55a14168d89b23b558285.tar.gz
cpython-aa789ace66b8276b7ea55a14168d89b23b558285.tar.bz2
Restore test that was using pysetup and can now (#15157) use pydoc
-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 1188d93..45a2987 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)