def get_clean_conf_dir():
    """
    Return the path to a temp clean configuration dir, for tests and safe mode.
    """
    if sys.platform.startswith("win"):
        current_user = ''
    else:
        current_user = '-' + str(getpass.getuser())

    conf_dir = osp.join(str(tempfile.gettempdir()),
                        'pytest-spyder{0!s}'.format(current_user),
                        SUBFOLDER)
    return conf_dir