#NEWLINE# def test_use_specific_generator_from_default_config( build_worktree ) : #NEWLINE# #INDENT# qibuild_xml = qisys . sh . get_config_path ( 'qi' , 'qibuild.xml' ) #NEWLINE# with open ( qibuild_xml , 'w' ) as fp : #NEWLINE# #INDENT# fp . write ( '\n<qibuild>\n  <defaults>\n    <cmake generator="Ninja" />\n  </defaults>\n  <config name="vs2010">\n    <cmake generator="Visual Studio 2010" />\n  </config>\n</qibuild>\n' ) #NEWLINE# #UNINDENT# qitoolchain . toolchain . Toolchain ( 'vs2010' ) #NEWLINE# build_worktree . set_default_config ( 'vs2010' ) #NEWLINE# build_config = qibuild . build_config . CMakeBuildConfig ( build_worktree ) #NEWLINE# assert ( build_config . cmake_generator == 'Visual Studio 2010' )