def is_modified(path, commit):
    """
    Test whether a given file was present and modified in a specific commit.

    Parameters
    ----------
    path : str
        The path of a file to be checked.
    commit : git.Commit
        A git commit object.

    Returns
    -------
    bool
        Whether or not the given path is among the modified files
        and was not deleted in this commit.

    """
    try:
        d = commit.stats.files[path]
        if (d["insertions"] == 0) and (d["deletions"] == d["lines"]):
            # File was deleted in commit, so cannot be tested
            return False
        else:
            return True
    except KeyError:
        return False