berkus/dir_monitor — pull request #3 by obaskanderi (2014-09-30 18:13:24+00:00)
Title: Fix crash on Mac and use fullpath on Unix

I've trying to get the test cases passing on both Mac and Unix, focusing on test_sync at the moment.

The fullpath patch to unix makes all the test cases pass.
The crash fix on mac allows the tests to run, but they are currently failing.

I believe the test on Mac failing because the events are batched on Mac because FSEventsStream uses a 5 second interval. When looking into test_sync create_file I noticed that the events_ deque has multiple events. It contained both the creation of the directory and the file. When monitor() is called is just pops the first one off which is the created directory event and the paths do not match.

This seems to be the case with other tests as well, the same thing occurs with file renaming. First see the file added event and then file renamed event, but monitor() only returns the added when the test expects to see the renaming event.

This is specific to the Mac since I believe inotify will immediately trigger an event and does not run an interval like FSEventStream. I haven't tested on Windows so don't know the state of the tests on Windows.