コード例 #1
0
 def test_stop_multiple(self):
     """Watches should became watching=False and the observer stopped."""
     second_path = self.parent_path + "second_path"
     second_watch = Watch(2, second_path, None)
     second_watch._watching = True
     self.manager._wdm[2] = second_watch
     self.manager.stop()
     self.assertFalse(second_watch.platform_watch.watching)
     self.assertEqual(second_watch._subdirs, set())
     # Give time to the thread to be finished.
     self.manager.platform_manager.observer.join()
     self.assertFalse(self.manager.platform_manager.observer.is_alive())