'Test upgrading an existing environment directory.'

def test_upgrade(self):

    for upgrade in (False, True):
        builder = venv.EnvBuilder(upgrade=upgrade)
        self.run_with_capture(builder.create, self.env_dir)
        self.isdir(self.bindir)
        self.isdir(self.include)
        self.isdir(*self.lib)
        fn = self.get_env_file(self.bindir, self.exe)
        if (not os.path.exists(fn)):
            bd = self.get_env_file(self.bindir)
            print ('Contents    of    %r:' % bd)
            print ('                %r' % os.listdir(bd))
        self.assertTrue(os.path.exists(fn), ('File    %r    should    exist.' % fn))
