def test_incompatible(self, initial_version, toolset):
     info = ConanInfo()
     settings = Settings.loads(get_default_settings_yml())
     info.settings = settings
     settings.compiler = "Visual Studio"
     settings.compiler.toolset = toolset
     settings.compiler.version = initial_version
     info.full_settings = info.settings
     info.vs_toolset_compatible()
     self.assertEqual(info.settings.compiler.version, initial_version)
     self.assertEqual(info.settings.compiler.toolset, toolset)
示例#2
0
 def test_compatible(self, initial_version, toolset, expected_version):
     info = ConanInfo()
     settings = Settings.loads(default_settings_yml)
     info.settings = settings
     settings.compiler = "Visual Studio"
     settings.compiler.toolset = toolset
     settings.compiler.version = initial_version
     info.full_settings = info.settings
     info.vs_toolset_compatible()
     self.assertEqual(info.settings.compiler.version, expected_version)
     self.assertIsNone(info.settings.get_safe("compiler.toolset"))