def test_is_platform() -> None:
    """The is_<platform> attributes work, warn, and mypy accepts code accessing them."""
    fully_qualified_names = [
        "git.compat.is_win",
        "git.compat.is_posix",
        "git.compat.is_darwin",
    ]

    with pytest.deprecated_call() as ctx:
        is_win = git.compat.is_win
        is_posix = git.compat.is_posix
        is_darwin = git.compat.is_darwin

    assert_type(is_win, bool)
    assert_type(is_posix, bool)
    assert_type(is_darwin, bool)

    messages = [str(entry.message) for entry in ctx]
    assert len(messages) == 3

    for fullname, message in zip(fully_qualified_names, messages):
        assert message.startswith(_MESSAGE_LEADER.format(fullname))

    # These assertions exactly reproduce the expressions in the code under test, so they
    # are not good for testing that the values are correct. Instead, their purpose is to
    # ensure that any dynamic machinery put in place in git.compat to cause warnings to
    # be issued does not get in the way of the intended values being accessed.
    assert is_win == (os.name == "nt")
    assert is_posix == (os.name == "posix")
    assert is_darwin == (sys.platform == "darwin")
The is_<platform> attributes work, warn, and mypy accepts code accessing them.
test/deprecation/test_compat.py