def METHOD_NAME(cmake_line, expected):
    cmake_line_number = 7
    with pytest.raises(type(expected)) if \
     isinstance(expected, Exception) else nullcontext() as exception:
        entry = CMakeCacheEntry.from_line(cmake_line, cmake_line_number)
    if exception is not None:
        assert repr(exception.value) == repr(expected)
        return
    if expected is None:
        assert entry is None
        return
    assert entry.name == expected.name
    assert entry.value == expected.value