def __del__(self):
        """
        If C{self._fd} is unclosed, raise a warning.
        """
        if self._fd:
            if not _PY3:
                ResourceWarning = Warning
            warnings.warn("FD %s was not closed!" % (self._fd,),
                          ResourceWarning)
            self.close()

        If C{self._fd} is unclosed, raise a warning.
        
stackoverflow/venv/lib/python3.6/site-packages/twisted/python/test/test_sendmsg.py