# under Posix, we also create a link in /tmp if the path does not exist
            self.create_symlink("/tmp", temp_dir)
            # reset the used size to 0 to avoid having the link size counted
            # which would make disk size tests more complicated
            next(iter(self.mount_points.values()))["used_size"] = 0


def _run_doctest() -> TestResults:
    import doctest
    import pyfakefs

    return doctest.testmod(pyfakefs.fake_filesystem)


def __getattr__(name):
    # backwards compatibility for read access to globals moved to helpers
    if name == "USER_ID":
        return helpers.USER_ID
    if name == "GROUP_ID":
        return helpers.GROUP_ID
    raise AttributeError(f"No attribute {name!r}.")


if __name__ == "__main__":
    _run_doctest()
