def test_is_path_dir_missing_no_subdir(self):
     """Test when the path does not exist and is no a subdir."""
     path = '/Users/username/path/to/not/dir'
     test_path = self.mktemp("test_directory")
     self.patch(os.path, 'exists', lambda path: False)
     watch = Watch(1, test_path, None)
     self.assertFalse(watch._path_is_dir(path))
 def test_is_path_dir_present_no_dir(self):
     """Test when the path is present but not a dir."""
     path = '/Users/username/path/to/not/dir'
     test_path = self.mktemp("test_directory")
     self.patch(os.path, 'exists', lambda path: True)
     self.patch(os.path, 'isdir', lambda path: False)
     watch = Watch(1, test_path, None)
     watch._subdirs.add(path)
     self.assertFalse(watch._path_is_dir(path))