gorakhargosh / watchdog

Python library and shell utilities to monitor filesystem events.
http://packages.python.org/watchdog/
Apache License 2.0
6.64k stars 698 forks source link

Add follow symlink tests #1087

Closed Corentin-pro closed 2 weeks ago

Corentin-pro commented 2 weeks ago

Added 2 tests for the new follow_symlink options.

The tests correctly fail if follow_symlink is set to False.

The code coverage slightly increases, this only adds the line 185 of src/watchdog/observers/inotify_c.py corresponding to

if follow_symlink:
    event_mask &= ~InotifyConstants.IN_DONT_FOLLOW

PS : a minor code style was automatically fixed in src/watchdog/observers/fsevents.py.

BoboTiG commented 2 weeks ago

Thanks a lot @Corentin-pro 🥂