class_docstr: Base class for venv tests.
class_docstr_tok: ["Base","class","for","venv","tests","."]
code: def setUp(self):
      self.env_dir = os.path.realpath(tempfile.mkdtemp())
      if os.name == "nt":
          self.bindir = "Scripts"
          self.lib = ("Lib",)
          self.include = "Include"
      else:
          self.bindir = "bin"
          self.lib = ("lib", "python%d.%d" % sys.version_info[:2])
          self.include = "include"
      executable = sys._base_executable
      self.exe = os.path.split(executable)[-1]
      if (
          sys.platform == "win32"
          and os.path.lexists(executable)
          and not os.path.exists(executable)
      ):
          self.cannot_link_exe = True
      else:
          self.cannot_link_exe = False
  
imports: import contextlib
  import ensurepip
  import os
  import os.path
  import pathlib
  import re
  import shutil
  import struct
  import subprocess
  import sys
  import sysconfig
  import tempfile
  from test.support import captured_stdout, captured_stderr, skip_if_broken_multiprocessing_synchronize, verbose, requires_subprocess, is_emscripten, is_wasi, requires_venv_with_pip, TEST_HOME_DIR, requires_resource, copy_python_src_ignore
  from test.support.os_helper import can_symlink, EnvironmentVarGuard, rmtree
  import unittest
  import venv
  from unittest.mock import patch, Mock
label_desc: Use image node_id 1 for calling the BaseTest obj's underlying member method code with example usage: obj.setUp() without return types