class_docstr: Test venv module functionality.
class_docstr_tok: ["Test","venv","module","functionality","."]
docstr: Test that the prefix values are as expected.
docstr_tok: ["Test","that","the","prefix","values","are","as","expected","."]
code: def test_prefixes(self):
      """
      Test that the prefix values are as expected.
      """
      # check a venv's prefixes
      rmtree(self.env_dir)
      self.run_with_capture(venv.create, self.env_dir)
      cmd = [self.envpy(), "-c", None]
      for prefix, expected in (
          ("prefix", self.env_dir),
          ("exec_prefix", self.env_dir),
          ("base_prefix", sys.base_prefix),
          ("base_exec_prefix", sys.base_exec_prefix),
      ):
          cmd[2] = "import sys; print(sys.%s)" % prefix
          out, err = check_output(cmd)
          self.assertEqual(out.strip(), expected.encode(), prefix)
  
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 8 for calling the BasicTest obj's underlying member method code with example usage: obj.test_prefixes() without return types