def test_dir_contains_public_attributes() -> None:
    """All public attributes of the git module are present when dir() is called on it.

    This is naturally the case, but some ways of adding dynamic attribute access
    behavior can change it, especially if __dir__ is defined but care is not taken to
    preserve the contents that should already be present.

    Note that dir() should usually automatically list non-public attributes if they are
    actually "physically" present as well, so the approach taken here to test it should
    not be reproduced if __dir__ is added (instead, a call to globals() could be used,
    as its keys list the automatic values).
    """
    expected_subset = set(git.__all__)
    actual = set(dir(git))
    assert expected_subset <= actual
All public attributes of the git module are present when dir() is called on it.

    This is naturally the case, but some ways of adding dynamic attribute access
    behavior can change it, especially if __dir__ is defined but care is not taken to
    preserve the contents that should already be present.

    Note that dir() should usually automatically list non-public attributes if they are
    actually "physically" present as well, so the approach taken here to test it should
    not be reproduced if __dir__ is added (instead, a call to globals() could be used,
    as its keys list the automatic values).
    
test/deprecation/test_toplevel.py