def test_create(self):
        """
        Creating a file in a monitored directory sends an
        C{inotify.IN_CREATE} event to the callback.
        """
        def operation(path):
            path.open("w").close()

        return self._notificationTest(inotify.IN_CREATE, operation)

        Creating a file in a monitored directory sends an
        C{inotify.IN_CREATE} event to the callback.
        
stackoverflow/venv/lib/python3.6/site-packages/twisted/internet/test/test_inotify.py