def getPty(self, terminal, window, modes):
        """
        If the terminal is 'bad', fail.  Otherwise, store the information in
        the ptyRequest variable.
        """
        if terminal != b'bad':
            self.ptyRequest = (terminal, window, modes)
        else:
            raise RuntimeError('not getting a pty')

        If the terminal is 'bad', fail.  Otherwise, store the information in
        the ptyRequest variable.
        
stackoverflow/venv/lib/python3.6/site-packages/twisted/conch/test/test_session.py