Fix tests: handle must not be saved to .watches until it was started

Otherwise .is_watching() method does not return valid results.
This commit is contained in:
ZyX 2014-12-28 23:51:45 +03:00
parent eb9c14096b
commit ff10b9e862
1 changed files with 1 additions and 1 deletions

View File

@ -87,8 +87,8 @@ class UvWatcher(object):
def _start_watch_1_x(self, path): def _start_watch_1_x(self, path):
handle = pyuv.fs.FSEvent(self.loop) handle = pyuv.fs.FSEvent(self.loop)
self.watches[path] = handle
handle.start(path, 0, partial(self._record_event, path)) handle.start(path, 0, partial(self._record_event, path))
self.watches[path] = handle
def _start_watch_0_x(self, path): def _start_watch_0_x(self, path):
self.watches[path] = pyuv.fs.FSEvent( self.watches[path] = pyuv.fs.FSEvent(