def test_deleteSelf(self):
        """
        Deleting the monitored directory itself sends an
        C{inotify.IN_DELETE_SELF} event to the callback.
        """
        def operation(path):
            path.remove()

        return self._notificationTest(
            inotify.IN_DELETE_SELF, operation, expectedPath=self.dirname)

        Deleting the monitored directory itself sends an
        C{inotify.IN_DELETE_SELF} event to the callback.
        
stackoverflow/venv/lib/python3.6/site-packages/twisted/internet/test/test_inotify.py