parameters: (self)
docstring: Remove the temporary directory created and reset state
docstring_summary: Remove the temporary directory created and reset state
docstring_tokens: Remove the temporary directory created and reset state
function: def cleanup(self):
  
          # type: () -> None
  
          """Remove the temporary directory created and reset state
  
          """
  
          self._deleted = True
  
          if not os.path.exists(self._path):
  
              return
  
          # Make sure to pass unicode on Python 2 to make the contents also
  
          # use unicode, ensuring non-ASCII names and can be represented.
  
          # This is only done on Windows because POSIX platforms use bytes
  
          # natively for paths, and the bytes-text conversion omission avoids
  
          # errors caused by the environment configuring encodings incorrectly.
  
          if WINDOWS:
  
              rmtree(ensure_text(self._path))
  
          else:
  
              rmtree(self._path)
function_tokens: def cleanup ( self ) : # type: () -> None self . _deleted = True if not os . path . exists ( self . _path ) : return # Make sure to pass unicode on Python 2 to make the contents also # use unicode, ensuring non-ASCII names and can be represented. # This is only done on Windows because POSIX platforms use bytes # natively for paths, and the bytes-text conversion omission avoids # errors caused by the environment configuring encodings incorrectly. if WINDOWS : rmtree ( ensure_text ( self . _path ) ) else : rmtree ( self . _path )