class_docstr: These tests don't spawn children or hang.
code: def tearDown(self):
      pty.STDIN_FILENO = self.orig_stdin_fileno
      pty.STDOUT_FILENO = self.orig_stdout_fileno
      pty.close = self.orig_pty_close
      pty._copy = self.orig_pty__copy
      pty.fork = self.orig_pty_fork
      pty.select = self.orig_pty_select
      pty.setraw = self.orig_pty_setraw
      pty.tcgetattr = self.orig_pty_tcgetattr
      pty.tcsetattr = self.orig_pty_tcsetattr
      pty.waitpid = self.orig_pty_waitpid
      for file in self.files:
          try:
              file.close()
          except OSError:
              pass
      for fd in self.fds:
          try:
              os.close(fd)
          except OSError:
              pass
  
imports: from test.support import verbose, reap_children
  from test.support.import_helper import import_module
  import errno
  import os
  import pty
  import tty
  import sys
  import select
  import signal
  import socket
  import io
  import unittest
  import warnings
label_desc: Use image node_id 2 for calling the SmallPtyTests obj's underlying member method code with example usage: obj.tearDown() without return types