def generate_filename(in_path, output_dir):
    """
    Create the filename of the new test video clip.

    Parameters
    ----------
    in_path : str
        Full path of input video.
    output_dir : str
        Directory of output video.

    Returns
    -------
    out_path : str
        Full path of output video.
    """
    if in_path.count('.') >= 2:
        raise Exception('Filename has multiple full stops')
    output_video = in_path.split('/')[-1].replace('.', '_test.')
    out_path = output_dir + output_video
    return out_path