.. :doctest:

The dirinfo provides a wrapper for info on one directory:

    >>> from checkoutmanager import dirinfo

Initialise the wrapper with a directory name:

    >>> info = dirinfo.DirInfo('/non/existing', 'some/url')

Ask if it exists:

    >>> info.exists
    False

Make an empty directory in the mock homedir and use that:

    >>> homedir = getfixture("homedir_in_tmp")
    >>> empty_dir = homedir / "exists"
    >>> empty_dir.mkdir()
    >>> info = dirinfo.DirInfo(empty_dir, 'some/url')
    >>> info.exists
    False

We need one of the ``.git``, ``.hg``-like directories in there:

    >>> dot_dir = empty_dir / ".xxx"
    >>> dot_dir.mkdir()
    >>> info.exists
    True
    >>> str(info.directory).endswith("exists")
    True
