def __get_sub_rec(self, lpath):
        for d in lpath:
            root = self.get_path(d)
            if root is not None:
                # always keep root
                yield d
            else:
                # if invalid
                continue

            # nothing else to expect
            if not os.path.isdir(root):
                continue

            # normalization
            root = os.path.normpath(root)
            # recursion
            lend = len(root)
            for iwd in self._wmd.items():
                cur = iwd[1].path
                pref = os.path.commonprefix([root, cur])
                if root == os.sep or (len(pref) == lend and \
                                      len(cur) > lend and \
                                      cur[lend] == os.sep):
                    yield iwd[1].wd
Tests that an error is raised when cmd.run_all errors
dataset/ETHPy150Open seb-m/pyinotify/python2/pyinotify.py/WatchManager.__get_sub_rec--crossover with--dataset/ETHPy150Open saltstack/salt/tests/unit/modules/mac_desktop_test.py/MacDesktopTestCase.test_get_output_volume_error