def METHOD_NAME(roster_opts, roster_dir, expected_targets_return):
    roster_opts["roster_file"] = str(roster_dir / "roster.py")
    with patch.dict(ansible.__opts__, roster_opts):
        ret = ansible.targets("*")
        assert ret == expected_targets_return