def METHOD_NAME():
    has_vs_2017 = find_visual_studio(vs_version=VS_YEAR_TO_VERSION["2017"])
    if not has_vs_2017:
        pytest.skip("Visual Studio 15 2017 is not found")
    arch = platform.architecture()[0]
    vs_generator = "Visual Studio 15 2017"
    orig_generator = vs_generator
    if arch == "64bit":
        vs_generator += " Win64"
    @project_setup_py_test("hello-cpp", ["build", "-G", vs_generator], ret=True)
    def run_build():
        pass
    tmp_dir = run_build()[0]
    cmakecache = tmp_dir.join(CMAKE_BUILD_DIR()).join("CMakeCache.txt")
    variables = get_cmakecache_variables(str(cmakecache))
    generator = variables["CMAKE_GENERATOR"][1]
    assert generator == orig_generator
    var_toolset = variables["CMAKE_GENERATOR_TOOLSET"]
    toolset = var_toolset[1]
    assert toolset == "v141"