|
|
|
@ -1290,8 +1290,8 @@ value = another_value
|
|
|
|
|
def test_test_if_Datavars_object_is_created_with_a_specific_variables_path_and_the_repository_map_the_current_profile_path_and_some_ini_files_paths_is_set_in_the_variables__the_Datavars_object_finds_all_variables_packages_and_ini_files_from_a_profile_using_the_profile_path_variable_and_the_repositories_variable_and_loads_variables_from_ini_files_from_the_env_order_and_the_env_path_variables(self):
|
|
|
|
|
datavars = Datavars(
|
|
|
|
|
variables_path=os.path.join(TESTFILES_PATH, 'variables_5'))
|
|
|
|
|
assert datavars.system.env_order == ['system', 'local']
|
|
|
|
|
assert datavars.system.env_path.get_hash() == {
|
|
|
|
|
assert datavars.main.cl.system.env_order == ['system', 'local']
|
|
|
|
|
assert datavars.main.cl.system.env_path.get_hash() == {
|
|
|
|
|
'system':
|
|
|
|
|
os.path.join(
|
|
|
|
|
TESTFILES_PATH,
|
|
|
|
@ -1502,9 +1502,9 @@ test = new value'''
|
|
|
|
|
datavars.save_variables()
|
|
|
|
|
|
|
|
|
|
assert local_ini_result == read_file(
|
|
|
|
|
datavars.system.env_path['local'].value)
|
|
|
|
|
datavars.main.cl.system.env_path['local'].value)
|
|
|
|
|
assert system_ini_result == read_file(
|
|
|
|
|
datavars.system.env_path['system'].value)
|
|
|
|
|
datavars.main.cl.system.env_path['system'].value)
|
|
|
|
|
|
|
|
|
|
def test_if_Datavars_object_is_set_as_the_datavars_for_the_TemplateEngine_object_and_save_tag_is_used_for_changing_some_hash_variable_s_values_and_target_file_is_set_for_the_save_tag__the_Datavars_object_modifies_hash_variables_and_saves_them_to_the_target_files_as_namespaces(self):
|
|
|
|
|
datavars = Datavars(
|
|
|
|
@ -1535,7 +1535,7 @@ id_2 = 1349'''
|
|
|
|
|
template_engine.process_template_from_string(input_template_1, FILE)
|
|
|
|
|
datavars.save_variables()
|
|
|
|
|
assert system_ini_result ==\
|
|
|
|
|
read_file(datavars.system.env_path['system'].value)
|
|
|
|
|
read_file(datavars.main.cl.system.env_path['system'].value)
|
|
|
|
|
|
|
|
|
|
# Теперь тестируем обработку ошибок.
|
|
|
|
|
def test_if_calculate_ini_file_has_some_syntax_errors_in_its_text__loader_skips_incorrect_lines_and_puts_some_error_messages_in_the_output(self):
|
|
|
|
|