]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
Restore test that was using pysetup and can now (#15157) use pydoc
authorÉric Araujo <merwok@netwok.org>
Sun, 24 Jun 2012 17:51:22 +0000 (13:51 -0400)
committerÉric Araujo <merwok@netwok.org>
Sun, 24 Jun 2012 17:51:22 +0000 (13:51 -0400)
Lib/test/test_venv.py

index 1188d939452c408039cc98c564ba8ea7d56acbfc..45a29873f8776b5650c9fdd1e5051eda000b2ead 100644 (file)
@@ -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)