def test_get__returns_none_with_empty_config(self, cmake_define_alias): cmake_define_name = CMakeProjectConfig.CMAKE_DEFINE_ALIASES[ cmake_define_alias] config = CMakeProjectConfig() value = config.get(cmake_define_alias) assert value is None assert config.cmake_defines.get(cmake_define_name) is None assert cmake_define_alias not in config.data assert cmake_define_name not in config.cmake_defines
def test_get__returns_value_with_non_empty_config(self, cmake_define_alias): cmake_define_name = CMakeProjectConfig.CMAKE_DEFINE_ALIASES[ cmake_define_alias] expected_value = "value_1:{0}".format(cmake_define_alias.upper()) data = dict() data[cmake_define_alias] = expected_value config = CMakeProjectConfig(data) value = config.get(cmake_define_alias) assert value == expected_value assert config.cmake_defines[cmake_define_name] == expected_value assert cmake_define_alias not in config.data assert cmake_define_name in config.cmake_defines