code: def setUp(self):
      run_pip_patch = unittest.mock.patch("ensurepip._run_pip")
      self.run_pip = run_pip_patch.start()
      self.run_pip.return_value = 0
      self.addCleanup(run_pip_patch.stop)
  
      # Avoid side effects on the actual os module
      real_devnull = os.devnull
      os_patch = unittest.mock.patch("ensurepip.os")
      patched_os = os_patch.start()
      # But expose os.listdir() used by _find_packages()
      patched_os.listdir = os.listdir
      self.addCleanup(os_patch.stop)
      patched_os.devnull = real_devnull
      patched_os.path = os.path
      self.os_environ = patched_os.environ = os.environ.copy()
  
imports: import contextlib
  import os
  import os.path
  import sys
  import tempfile
  import test.support
  import unittest
  import unittest.mock
  import ensurepip
  import ensurepip._uninstall
label_desc: Use image node_id 1 for calling the EnsurepipMixin obj's underlying member method code with example usage: obj.setUp() without return types