From 26ae0b4e765980b89a66e11f4b2b3d11175bf066 Mon Sep 17 00:00:00 2001 From: Emmanuel Garette Date: Sun, 11 May 2025 08:07:12 +0200 Subject: [PATCH] fix: load file with order --- locale/rougail_user_data_yaml.pot | 2 +- src/rougail/user_data_yaml/__init__.py | 6 +- tests/errors/results/00_unknown_variable.yaml | 6 ++ tests/errors/results/01_disabled_family.yaml | 7 ++ .../errors/results/01_disabled_variable.yaml | 6 ++ tests/errors/results/01_wrong_type.yaml | 6 ++ .../results/02_disabled_hidden_family.yaml | 6 ++ tests/errors/results/04_value_secret.yaml | 6 ++ tests/errors/results/05_value_family.yaml | 6 ++ tests/errors/results/06_dynamic_unknown.yaml | 6 ++ .../results/07_leadership_disabled.yaml | 9 +++ .../errors/results/07_leadership_unknown.yaml | 6 ++ .../results/07_leadership_wrong_len.yaml} | 0 tests/errors/structure/rougail/00_rougail.yml | 68 +++++++++++++++++++ tests/errors/yaml/00_unknown_variable.yaml | 2 + tests/errors/yaml/01_disabled_family.yaml | 4 ++ tests/errors/yaml/01_disabled_variable.yaml | 2 + tests/errors/yaml/01_wrong_type.yaml | 2 + .../yaml/02_disabled_hidden_family.yaml | 3 + tests/errors/yaml/04_value_secret.yaml | 2 + tests/errors/yaml/05_value_family.yaml | 2 + tests/errors/yaml/06_dynamic_unknown.yaml | 3 + tests/errors/yaml/07_leadership_disabled.yaml | 14 ++++ tests/errors/yaml/07_leadership_unknown.yaml | 4 ++ .../errors/yaml/07_leadership_wrong_len.yaml | 5 ++ .../errors/all.json | 0 .../errors/mandatories.json | 0 tests/results/00_0no_variable/file/all.yml | 1 + .../00_0no_variable/file/all_exclude.yml | 1 + .../00_0no_variable/file/mandatories.yml | 1 + .../results/00_0no_variable/makedict/all.json | 1 + .../00_0no_variable/makedict/mandatories.json | 1 + .../errors/all.json} | 0 .../errors/mandatories.json | 4 ++ .../file/all.yml | 1 + .../file/all_exclude.yml | 1 + .../file/mandatories.yml | 1 + .../makedict/all.json | 1 + .../makedict/mandatories.json | 1 + .../errors/all.json | 4 ++ .../errors/mandatories.json | 4 ++ .../file/all.yml | 1 + .../file/all_exclude.yml | 1 + .../file/mandatories.yml | 1 + .../makedict/all.json | 1 + .../makedict/mandatories.json | 1 + .../errors/all.json | 9 +++ .../errors/mandatories.json | 4 ++ .../file/all.yml | 17 +++++ .../file/all_exclude.yml | 17 +++++ .../file/mandatories.yml | 1 + .../makedict/all.json | 9 +++ .../makedict/mandatories.json | 9 +++ .../errors/all.json | 4 ++ .../errors/mandatories.json | 4 ++ .../file/all.yml | 6 ++ .../file/all_exclude.yml | 6 ++ .../file/mandatories.yml | 5 ++ .../makedict/all.json | 4 ++ .../makedict/mandatories.json | 4 ++ .../04_1auto_save_and_hidden/errors/all.json | 2 +- .../errors/mandatories.json | 2 +- .../errors/mandatories.json | 2 +- .../errors/all.json | 7 ++ .../errors/mandatories.json | 6 ++ .../file/all.yml | 7 ++ .../file/all_exclude.yml | 7 ++ .../file/mandatories.yml | 5 ++ .../makedict/all.json | 4 ++ .../makedict/mandatories.json | 4 ++ .../errors/all.json | 6 ++ .../errors/mandatories.json | 4 ++ .../file/all.yml | 7 ++ .../file/all_exclude.yml | 7 ++ .../file/mandatories.yml | 5 ++ .../makedict/all.json | 5 ++ .../makedict/mandatories.json | 5 ++ .../errors/all.json | 6 ++ .../errors/mandatories.json | 6 ++ .../file/all.yml | 7 ++ .../file/all_exclude.yml | 7 ++ .../file/mandatories.yml | 5 ++ .../makedict/all.json | 5 ++ .../makedict/mandatories.json | 4 ++ .../errors/all.json | 7 ++ .../errors/mandatories.json | 4 ++ .../file/all.yml | 7 ++ .../file/all_exclude.yml | 7 ++ .../file/mandatories.yml | 5 ++ .../makedict/all.json | 4 ++ .../makedict/mandatories.json | 5 ++ .../errors/all.json | 2 +- .../errors/all.json | 2 +- .../errors/all.json | 2 +- .../errors/mandatories.json | 2 +- .../errors/mandatories.json | 2 +- .../errors/all.json | 2 +- .../errors/all.json | 2 +- .../file/all.yml | 14 ---- .../file/all_exclude.yml | 14 ---- .../file/mandatories.yml | 14 ---- .../makedict/all.json | 12 ---- .../makedict/mandatories.json | 12 ---- .../file/all.yml | 14 ---- .../file/all_exclude.yml | 14 ---- .../file/mandatories.yml | 9 --- .../makedict/all.json | 12 ---- .../makedict/mandatories.json | 11 --- .../04_5hidden_calculation2/errors/all.json | 4 +- .../04_5validators_multi3/errors/all.json | 4 ++ .../errors/mandatories.json | 4 ++ .../04_5validators_multi3/file/all.yml | 7 ++ .../file/all_exclude.yml | 7 ++ .../file/mandatories.yml | 1 + .../04_5validators_multi3/makedict/all.json | 5 ++ .../makedict/mandatories.json | 7 ++ .../errors/all.json | 2 +- .../errors/mandatories.json | 2 +- .../errors/all.json | 2 +- .../errors/mandatories.json | 2 +- .../16_5exists_redefine/errors/all.json | 2 +- .../16_5redefine_hidden/errors/all.json | 2 +- .../17_5redefine_leadership/errors/all.json | 2 +- .../20_0family_underscore/errors/all.json | 12 ++-- .../errors/all.json | 2 +- .../errors/all.json | 2 +- .../errors/all.json | 4 +- .../errors/mandatories.json | 2 +- .../errors/all.json | 4 ++ .../errors/mandatories.json | 4 ++ .../file/all.yml | 45 ++++++++++++ .../file/all_exclude.yml | 45 ++++++++++++ .../file/mandatories.yml | 1 + .../makedict/all.json | 43 ++++++++++++ .../makedict/mandatories.json | 3 + .../44_0leadership_hidden/errors/all.json | 2 +- .../errors/all.json | 2 +- .../errors/all.json | 2 +- .../errors/mandatories.json | 4 +- .../results/60_0family_hidden/errors/all.json | 2 +- .../errors/all.json | 2 +- .../errors/mandatories.json | 2 +- .../errors/all.json | 4 +- .../errors/all.json | 7 ++ .../errors/mandatories.json | 4 ++ .../file/all.yml | 15 ++++ .../file/all_exclude.yml | 11 +++ .../file/mandatories.yml | 1 + .../makedict/all.json | 9 +++ .../makedict/mandatories.json | 9 +++ .../errors/all.json | 7 ++ .../errors/mandatories.json | 4 ++ .../file/all.yml | 15 ++++ .../file/all_exclude.yml | 11 +++ .../file/mandatories.yml | 1 + .../makedict/all.json | 9 +++ .../makedict/mandatories.json | 9 +++ .../errors/all.json | 7 ++ .../errors/mandatories.json | 4 ++ .../file/all.yml | 27 ++++++++ .../file/all_exclude.yml | 23 +++++++ .../file/mandatories.yml | 1 + .../makedict/all.json | 19 ++++++ .../makedict/mandatories.json | 18 +++++ .../errors/all.json | 4 +- .../errors/all.json | 4 +- .../errors/all.json | 4 ++ .../errors/mandatories.json | 4 ++ .../file/all.yml | 24 +++++++ .../file/all_exclude.yml | 20 ++++++ .../file/mandatories.yml | 20 ++++++ .../makedict/all.json | 10 +++ .../makedict/mandatories.json | 10 +++ tests/test_load.py | 51 +++++++++++--- 174 files changed, 1035 insertions(+), 180 deletions(-) create mode 100644 tests/errors/results/00_unknown_variable.yaml create mode 100644 tests/errors/results/01_disabled_family.yaml create mode 100644 tests/errors/results/01_disabled_variable.yaml create mode 100644 tests/errors/results/01_wrong_type.yaml create mode 100644 tests/errors/results/02_disabled_hidden_family.yaml create mode 100644 tests/errors/results/04_value_secret.yaml create mode 100644 tests/errors/results/05_value_family.yaml create mode 100644 tests/errors/results/06_dynamic_unknown.yaml create mode 100644 tests/errors/results/07_leadership_disabled.yaml create mode 100644 tests/errors/results/07_leadership_unknown.yaml rename tests/{results/04_5disabled_calculation_variable_multi2/errors/all.json => errors/results/07_leadership_wrong_len.yaml} (100%) create mode 100644 tests/errors/structure/rougail/00_rougail.yml create mode 100644 tests/errors/yaml/00_unknown_variable.yaml create mode 100644 tests/errors/yaml/01_disabled_family.yaml create mode 100644 tests/errors/yaml/01_disabled_variable.yaml create mode 100644 tests/errors/yaml/01_wrong_type.yaml create mode 100644 tests/errors/yaml/02_disabled_hidden_family.yaml create mode 100644 tests/errors/yaml/04_value_secret.yaml create mode 100644 tests/errors/yaml/05_value_family.yaml create mode 100644 tests/errors/yaml/06_dynamic_unknown.yaml create mode 100644 tests/errors/yaml/07_leadership_disabled.yaml create mode 100644 tests/errors/yaml/07_leadership_unknown.yaml create mode 100644 tests/errors/yaml/07_leadership_wrong_len.yaml rename tests/results/{04_5disabled_calculation_variable_multi3 => 00_0no_variable}/errors/all.json (100%) rename tests/results/{04_5disabled_calculation_variable_multi2 => 00_0no_variable}/errors/mandatories.json (100%) create mode 100644 tests/results/00_0no_variable/file/all.yml create mode 100644 tests/results/00_0no_variable/file/all_exclude.yml create mode 100644 tests/results/00_0no_variable/file/mandatories.yml create mode 100644 tests/results/00_0no_variable/makedict/all.json create mode 100644 tests/results/00_0no_variable/makedict/mandatories.json rename tests/results/{04_5disabled_calculation_variable_multi3/errors/mandatories.json => 00_0no_variable_default_version/errors/all.json} (100%) create mode 100644 tests/results/00_0no_variable_default_version/errors/mandatories.json create mode 100644 tests/results/00_0no_variable_default_version/file/all.yml create mode 100644 tests/results/00_0no_variable_default_version/file/all_exclude.yml create mode 100644 tests/results/00_0no_variable_default_version/file/mandatories.yml create mode 100644 tests/results/00_0no_variable_default_version/makedict/all.json create mode 100644 tests/results/00_0no_variable_default_version/makedict/mandatories.json create mode 100644 tests/results/00_0no_variable_remove_version/errors/all.json create mode 100644 tests/results/00_0no_variable_remove_version/errors/mandatories.json create mode 100644 tests/results/00_0no_variable_remove_version/file/all.yml create mode 100644 tests/results/00_0no_variable_remove_version/file/all_exclude.yml create mode 100644 tests/results/00_0no_variable_remove_version/file/mandatories.yml create mode 100644 tests/results/00_0no_variable_remove_version/makedict/all.json create mode 100644 tests/results/00_0no_variable_remove_version/makedict/mandatories.json create mode 100644 tests/results/00_2default_calculated_params_permissive/errors/all.json create mode 100644 tests/results/00_2default_calculated_params_permissive/errors/mandatories.json create mode 100644 tests/results/00_2default_calculated_params_permissive/file/all.yml create mode 100644 tests/results/00_2default_calculated_params_permissive/file/all_exclude.yml create mode 100644 tests/results/00_2default_calculated_params_permissive/file/mandatories.yml create mode 100644 tests/results/00_2default_calculated_params_permissive/makedict/all.json create mode 100644 tests/results/00_2default_calculated_params_permissive/makedict/mandatories.json create mode 100644 tests/results/00_2default_calculated_variable_description/errors/all.json create mode 100644 tests/results/00_2default_calculated_variable_description/errors/mandatories.json create mode 100644 tests/results/00_2default_calculated_variable_description/file/all.yml create mode 100644 tests/results/00_2default_calculated_variable_description/file/all_exclude.yml create mode 100644 tests/results/00_2default_calculated_variable_description/file/mandatories.yml create mode 100644 tests/results/00_2default_calculated_variable_description/makedict/all.json create mode 100644 tests/results/00_2default_calculated_variable_description/makedict/mandatories.json create mode 100644 tests/results/04_1default_calculation_hidden_3/errors/all.json create mode 100644 tests/results/04_1default_calculation_hidden_3/errors/mandatories.json create mode 100644 tests/results/04_1default_calculation_hidden_3/file/all.yml create mode 100644 tests/results/04_1default_calculation_hidden_3/file/all_exclude.yml create mode 100644 tests/results/04_1default_calculation_hidden_3/file/mandatories.yml create mode 100644 tests/results/04_1default_calculation_hidden_3/makedict/all.json create mode 100644 tests/results/04_1default_calculation_hidden_3/makedict/mandatories.json create mode 100644 tests/results/04_1default_calculation_hidden_4/errors/all.json create mode 100644 tests/results/04_1default_calculation_hidden_4/errors/mandatories.json create mode 100644 tests/results/04_1default_calculation_hidden_4/file/all.yml create mode 100644 tests/results/04_1default_calculation_hidden_4/file/all_exclude.yml create mode 100644 tests/results/04_1default_calculation_hidden_4/file/mandatories.yml create mode 100644 tests/results/04_1default_calculation_hidden_4/makedict/all.json create mode 100644 tests/results/04_1default_calculation_hidden_4/makedict/mandatories.json create mode 100644 tests/results/04_1default_calculation_hidden_5/errors/all.json create mode 100644 tests/results/04_1default_calculation_hidden_5/errors/mandatories.json create mode 100644 tests/results/04_1default_calculation_hidden_5/file/all.yml create mode 100644 tests/results/04_1default_calculation_hidden_5/file/all_exclude.yml create mode 100644 tests/results/04_1default_calculation_hidden_5/file/mandatories.yml create mode 100644 tests/results/04_1default_calculation_hidden_5/makedict/all.json create mode 100644 tests/results/04_1default_calculation_hidden_5/makedict/mandatories.json create mode 100644 tests/results/04_1default_calculation_hidden_6/errors/all.json create mode 100644 tests/results/04_1default_calculation_hidden_6/errors/mandatories.json create mode 100644 tests/results/04_1default_calculation_hidden_6/file/all.yml create mode 100644 tests/results/04_1default_calculation_hidden_6/file/all_exclude.yml create mode 100644 tests/results/04_1default_calculation_hidden_6/file/mandatories.yml create mode 100644 tests/results/04_1default_calculation_hidden_6/makedict/all.json create mode 100644 tests/results/04_1default_calculation_hidden_6/makedict/mandatories.json delete mode 100644 tests/results/04_5disabled_calculation_variable_multi2/file/all.yml delete mode 100644 tests/results/04_5disabled_calculation_variable_multi2/file/all_exclude.yml delete mode 100644 tests/results/04_5disabled_calculation_variable_multi2/file/mandatories.yml delete mode 100644 tests/results/04_5disabled_calculation_variable_multi2/makedict/all.json delete mode 100644 tests/results/04_5disabled_calculation_variable_multi2/makedict/mandatories.json delete mode 100644 tests/results/04_5disabled_calculation_variable_multi3/file/all.yml delete mode 100644 tests/results/04_5disabled_calculation_variable_multi3/file/all_exclude.yml delete mode 100644 tests/results/04_5disabled_calculation_variable_multi3/file/mandatories.yml delete mode 100644 tests/results/04_5disabled_calculation_variable_multi3/makedict/all.json delete mode 100644 tests/results/04_5disabled_calculation_variable_multi3/makedict/mandatories.json create mode 100644 tests/results/04_5validators_multi3/errors/all.json create mode 100644 tests/results/04_5validators_multi3/errors/mandatories.json create mode 100644 tests/results/04_5validators_multi3/file/all.yml create mode 100644 tests/results/04_5validators_multi3/file/all_exclude.yml create mode 100644 tests/results/04_5validators_multi3/file/mandatories.yml create mode 100644 tests/results/04_5validators_multi3/makedict/all.json create mode 100644 tests/results/04_5validators_multi3/makedict/mandatories.json create mode 100644 tests/results/40_6leadership_follower_multi_no_mandatory/errors/all.json create mode 100644 tests/results/40_6leadership_follower_multi_no_mandatory/errors/mandatories.json create mode 100644 tests/results/40_6leadership_follower_multi_no_mandatory/file/all.yml create mode 100644 tests/results/40_6leadership_follower_multi_no_mandatory/file/all_exclude.yml create mode 100644 tests/results/40_6leadership_follower_multi_no_mandatory/file/mandatories.yml create mode 100644 tests/results/40_6leadership_follower_multi_no_mandatory/makedict/all.json create mode 100644 tests/results/40_6leadership_follower_multi_no_mandatory/makedict/mandatories.json create mode 100644 tests/results/60_5family_dynamic_calc_suffix_hidden/errors/all.json create mode 100644 tests/results/60_5family_dynamic_calc_suffix_hidden/errors/mandatories.json create mode 100644 tests/results/60_5family_dynamic_calc_suffix_hidden/file/all.yml create mode 100644 tests/results/60_5family_dynamic_calc_suffix_hidden/file/all_exclude.yml create mode 100644 tests/results/60_5family_dynamic_calc_suffix_hidden/file/mandatories.yml create mode 100644 tests/results/60_5family_dynamic_calc_suffix_hidden/makedict/all.json create mode 100644 tests/results/60_5family_dynamic_calc_suffix_hidden/makedict/mandatories.json create mode 100644 tests/results/60_5family_dynamic_calc_suffix_hidden_boolean/errors/all.json create mode 100644 tests/results/60_5family_dynamic_calc_suffix_hidden_boolean/errors/mandatories.json create mode 100644 tests/results/60_5family_dynamic_calc_suffix_hidden_boolean/file/all.yml create mode 100644 tests/results/60_5family_dynamic_calc_suffix_hidden_boolean/file/all_exclude.yml create mode 100644 tests/results/60_5family_dynamic_calc_suffix_hidden_boolean/file/mandatories.yml create mode 100644 tests/results/60_5family_dynamic_calc_suffix_hidden_boolean/makedict/all.json create mode 100644 tests/results/60_5family_dynamic_calc_suffix_hidden_boolean/makedict/mandatories.json create mode 100644 tests/results/60_5family_dynamic_calc_suffix_hidden_multi/errors/all.json create mode 100644 tests/results/60_5family_dynamic_calc_suffix_hidden_multi/errors/mandatories.json create mode 100644 tests/results/60_5family_dynamic_calc_suffix_hidden_multi/file/all.yml create mode 100644 tests/results/60_5family_dynamic_calc_suffix_hidden_multi/file/all_exclude.yml create mode 100644 tests/results/60_5family_dynamic_calc_suffix_hidden_multi/file/mandatories.yml create mode 100644 tests/results/60_5family_dynamic_calc_suffix_hidden_multi/makedict/all.json create mode 100644 tests/results/60_5family_dynamic_calc_suffix_hidden_multi/makedict/mandatories.json create mode 100644 tests/results/60_6family_dynamic_sub_dynamic_1_0_2/errors/all.json create mode 100644 tests/results/60_6family_dynamic_sub_dynamic_1_0_2/errors/mandatories.json create mode 100644 tests/results/60_6family_dynamic_sub_dynamic_1_0_2/file/all.yml create mode 100644 tests/results/60_6family_dynamic_sub_dynamic_1_0_2/file/all_exclude.yml create mode 100644 tests/results/60_6family_dynamic_sub_dynamic_1_0_2/file/mandatories.yml create mode 100644 tests/results/60_6family_dynamic_sub_dynamic_1_0_2/makedict/all.json create mode 100644 tests/results/60_6family_dynamic_sub_dynamic_1_0_2/makedict/mandatories.json diff --git a/locale/rougail_user_data_yaml.pot b/locale/rougail_user_data_yaml.pot index 37b2934..594bbde 100644 --- a/locale/rougail_user_data_yaml.pot +++ b/locale/rougail_user_data_yaml.pot @@ -5,7 +5,7 @@ msgid "" msgstr "" "Project-Id-Version: PACKAGE VERSION\n" -"POT-Creation-Date: 2025-04-29 23:02+0200\n" +"POT-Creation-Date: 2025-05-03 22:46+0200\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" diff --git a/src/rougail/user_data_yaml/__init__.py b/src/rougail/user_data_yaml/__init__.py index aa2bb30..68d3075 100644 --- a/src/rougail/user_data_yaml/__init__.py +++ b/src/rougail/user_data_yaml/__init__.py @@ -110,7 +110,7 @@ class RougailUserDataYaml: self.parse(values, path + ".", value, filename) elif isinstance(value, list) and value and isinstance(value[0], dict): # it's a leadership - keys = set() + keys = [] for val in value: if not isinstance(val, dict): self.errors.append( @@ -119,7 +119,9 @@ class RougailUserDataYaml: ) ) break - keys |= set(val) + for v in val: + if v not in keys: + keys.append(v) else: for val in value: for key in keys: diff --git a/tests/errors/results/00_unknown_variable.yaml b/tests/errors/results/00_unknown_variable.yaml new file mode 100644 index 0000000..0bb4ffc --- /dev/null +++ b/tests/errors/results/00_unknown_variable.yaml @@ -0,0 +1,6 @@ +{ + "errors": [], + "warnings": [ + "variable or family \"unknown\" does not exist, it will be ignored when loading from the YAML file \"/home/gnunux/git/stove/rougail-user-data-yaml/tests/errors/yaml/00_unknown_variable.yaml\"" + ] +} \ No newline at end of file diff --git a/tests/errors/results/01_disabled_family.yaml b/tests/errors/results/01_disabled_family.yaml new file mode 100644 index 0000000..d394cb9 --- /dev/null +++ b/tests/errors/results/01_disabled_family.yaml @@ -0,0 +1,7 @@ +{ + "errors": [], + "warnings": [ + "family \"family_disabled\" is disabled, \"family_disabled.variable1\" will be ignored when loading from the YAML file \"/home/gnunux/git/stove/rougail-user-data-yaml/tests/errors/yaml/01_disabled_family.yaml\"", + "family \"family_disabled\" is disabled, \"family_disabled.variable2\" will be ignored when loading from the YAML file \"/home/gnunux/git/stove/rougail-user-data-yaml/tests/errors/yaml/01_disabled_family.yaml\"" + ] +} \ No newline at end of file diff --git a/tests/errors/results/01_disabled_variable.yaml b/tests/errors/results/01_disabled_variable.yaml new file mode 100644 index 0000000..b5c0024 --- /dev/null +++ b/tests/errors/results/01_disabled_variable.yaml @@ -0,0 +1,6 @@ +{ + "errors": [], + "warnings": [ + "variable \"variable_disabled\" is disabled, it will be ignored when loading from the YAML file \"/home/gnunux/git/stove/rougail-user-data-yaml/tests/errors/yaml/01_disabled_variable.yaml\"" + ] +} \ No newline at end of file diff --git a/tests/errors/results/01_wrong_type.yaml b/tests/errors/results/01_wrong_type.yaml new file mode 100644 index 0000000..0a69467 --- /dev/null +++ b/tests/errors/results/01_wrong_type.yaml @@ -0,0 +1,6 @@ +{ + "errors": [], + "warnings": [ + "the value \"test\" is invalid for \"variable_int\", which is not an integer, it will be ignored when loading from the YAML file \"/home/gnunux/git/stove/rougail-user-data-yaml/tests/errors/yaml/01_wrong_type.yaml\"" + ] +} \ No newline at end of file diff --git a/tests/errors/results/02_disabled_hidden_family.yaml b/tests/errors/results/02_disabled_hidden_family.yaml new file mode 100644 index 0000000..d12879d --- /dev/null +++ b/tests/errors/results/02_disabled_hidden_family.yaml @@ -0,0 +1,6 @@ +{ + "errors": [], + "warnings": [ + "family \"family_disabled_hidden\" is disabled and hidden, \"family_disabled_hidden.variable1\" will be ignored when loading from the YAML file \"/home/gnunux/git/stove/rougail-user-data-yaml/tests/errors/yaml/02_disabled_hidden_family.yaml\"" + ] +} \ No newline at end of file diff --git a/tests/errors/results/04_value_secret.yaml b/tests/errors/results/04_value_secret.yaml new file mode 100644 index 0000000..c195830 --- /dev/null +++ b/tests/errors/results/04_value_secret.yaml @@ -0,0 +1,6 @@ +{ + "errors": [], + "warnings": [ + "the value \"**********\" is invalid for \"secret\", at least 10 characters are required, it will be ignored when loading from the YAML file \"/home/gnunux/git/stove/rougail-user-data-yaml/tests/errors/yaml/04_value_secret.yaml\"" + ] +} \ No newline at end of file diff --git a/tests/errors/results/05_value_family.yaml b/tests/errors/results/05_value_family.yaml new file mode 100644 index 0000000..8c4b52d --- /dev/null +++ b/tests/errors/results/05_value_family.yaml @@ -0,0 +1,6 @@ +{ + "errors": [], + "warnings": [ + "cannot set the value \"test\" to the family \"family\", it will be ignored when loading from the YAML file \"/home/gnunux/git/stove/rougail-user-data-yaml/tests/errors/yaml/05_value_family.yaml\"" + ] +} \ No newline at end of file diff --git a/tests/errors/results/06_dynamic_unknown.yaml b/tests/errors/results/06_dynamic_unknown.yaml new file mode 100644 index 0000000..5db9612 --- /dev/null +++ b/tests/errors/results/06_dynamic_unknown.yaml @@ -0,0 +1,6 @@ +{ + "errors": [], + "warnings": [ + "variable or family \"dyn_unknown\" does not exist, it will be ignored when loading from the YAML file \"/home/gnunux/git/stove/rougail-user-data-yaml/tests/errors/yaml/06_dynamic_unknown.yaml\"" + ] +} \ No newline at end of file diff --git a/tests/errors/results/07_leadership_disabled.yaml b/tests/errors/results/07_leadership_disabled.yaml new file mode 100644 index 0000000..b8cc670 --- /dev/null +++ b/tests/errors/results/07_leadership_disabled.yaml @@ -0,0 +1,9 @@ +{ + "errors": [], + "warnings": [ + "variable \"leadership.follower_disabled\" at index \"0\" is disabled, it will be ignored when loading from the YAML file \"/home/gnunux/git/stove/rougail-user-data-yaml/tests/errors/yaml/07_leadership_disabled.yaml\"", + "variable \"leadership.follower_disabled\" at index \"1\" is disabled, it will be ignored when loading from the YAML file \"/home/gnunux/git/stove/rougail-user-data-yaml/tests/errors/yaml/07_leadership_disabled.yaml\"", + "variable \"leadership.follower_disabled\" at index \"2\" is disabled, it will be ignored when loading from the YAML file \"/home/gnunux/git/stove/rougail-user-data-yaml/tests/errors/yaml/07_leadership_disabled.yaml\"", + "variable \"leadership.follower_disabled_at_index\" at index \"1\" is disabled, it will be ignored when loading from the YAML file \"/home/gnunux/git/stove/rougail-user-data-yaml/tests/errors/yaml/07_leadership_disabled.yaml\"" + ] +} diff --git a/tests/errors/results/07_leadership_unknown.yaml b/tests/errors/results/07_leadership_unknown.yaml new file mode 100644 index 0000000..f84c019 --- /dev/null +++ b/tests/errors/results/07_leadership_unknown.yaml @@ -0,0 +1,6 @@ +{ + "errors": [], + "warnings": [ + "variable or family \"leadership.unknwon\" does not exist, it will be ignored when loading from the YAML file \"/home/gnunux/git/stove/rougail-user-data-yaml/tests/errors/yaml/07_leadership_unknown.yaml\"" + ] +} \ No newline at end of file diff --git a/tests/results/04_5disabled_calculation_variable_multi2/errors/all.json b/tests/errors/results/07_leadership_wrong_len.yaml similarity index 100% rename from tests/results/04_5disabled_calculation_variable_multi2/errors/all.json rename to tests/errors/results/07_leadership_wrong_len.yaml diff --git a/tests/errors/structure/rougail/00_rougail.yml b/tests/errors/structure/rougail/00_rougail.yml new file mode 100644 index 0000000..0559b75 --- /dev/null +++ b/tests/errors/structure/rougail/00_rougail.yml @@ -0,0 +1,68 @@ +%YAML 1.2 +--- +version: 1.1 + +variable: + +secret: + type: secret + params: + min_len: 10 + +variable_disabled: + disabled: true + +variable_disabled_hidden: + disabled: true + hidden: true + +variable_int: + type: number + +family: + + variable: + +family_disabled: + disabled: true + + variable1: + + variable2: + +family_disabled_hidden: + disabled: true + hidden: true + + variable1: + + variable2: + +dyn_{{ identifier }}: + dynamic: + - var1 + - var2 + + variable: + +leadership: + type: leadership + + leader: + + follower: + + follower_disabled: + disabled: true + + follower_disabled_at_index: + disabled: + jinja: >- + {% if index == 1 %} + true + {% else %} + {% endif %} + params: + index: + type: index +... diff --git a/tests/errors/yaml/00_unknown_variable.yaml b/tests/errors/yaml/00_unknown_variable.yaml new file mode 100644 index 0000000..7b419a3 --- /dev/null +++ b/tests/errors/yaml/00_unknown_variable.yaml @@ -0,0 +1,2 @@ +--- +unknown: 1 diff --git a/tests/errors/yaml/01_disabled_family.yaml b/tests/errors/yaml/01_disabled_family.yaml new file mode 100644 index 0000000..8bb36eb --- /dev/null +++ b/tests/errors/yaml/01_disabled_family.yaml @@ -0,0 +1,4 @@ +--- +family_disabled: + variable1: test + variable2: test diff --git a/tests/errors/yaml/01_disabled_variable.yaml b/tests/errors/yaml/01_disabled_variable.yaml new file mode 100644 index 0000000..8662d6f --- /dev/null +++ b/tests/errors/yaml/01_disabled_variable.yaml @@ -0,0 +1,2 @@ +--- +variable_disabled: test diff --git a/tests/errors/yaml/01_wrong_type.yaml b/tests/errors/yaml/01_wrong_type.yaml new file mode 100644 index 0000000..24963ce --- /dev/null +++ b/tests/errors/yaml/01_wrong_type.yaml @@ -0,0 +1,2 @@ +--- +variable_int: test diff --git a/tests/errors/yaml/02_disabled_hidden_family.yaml b/tests/errors/yaml/02_disabled_hidden_family.yaml new file mode 100644 index 0000000..d40d4ff --- /dev/null +++ b/tests/errors/yaml/02_disabled_hidden_family.yaml @@ -0,0 +1,3 @@ +--- +family_disabled_hidden: + variable1: test diff --git a/tests/errors/yaml/04_value_secret.yaml b/tests/errors/yaml/04_value_secret.yaml new file mode 100644 index 0000000..1b35017 --- /dev/null +++ b/tests/errors/yaml/04_value_secret.yaml @@ -0,0 +1,2 @@ +--- +secret: a diff --git a/tests/errors/yaml/05_value_family.yaml b/tests/errors/yaml/05_value_family.yaml new file mode 100644 index 0000000..e18ce98 --- /dev/null +++ b/tests/errors/yaml/05_value_family.yaml @@ -0,0 +1,2 @@ +--- +family: test diff --git a/tests/errors/yaml/06_dynamic_unknown.yaml b/tests/errors/yaml/06_dynamic_unknown.yaml new file mode 100644 index 0000000..c3640ad --- /dev/null +++ b/tests/errors/yaml/06_dynamic_unknown.yaml @@ -0,0 +1,3 @@ +--- +dyn_unknown: + variable: test diff --git a/tests/errors/yaml/07_leadership_disabled.yaml b/tests/errors/yaml/07_leadership_disabled.yaml new file mode 100644 index 0000000..733e9a6 --- /dev/null +++ b/tests/errors/yaml/07_leadership_disabled.yaml @@ -0,0 +1,14 @@ +--- +leadership: + - leader: test1 + follower: test1 + follower_disabled: test1 + follower_disabled_at_index: test1 + - leader: test2 + follower: test2 + follower_disabled: test2 + follower_disabled_at_index: test2 + - leader: test3 + follower: test3 + follower_disabled: test3 + follower_disabled_at_index: test3 diff --git a/tests/errors/yaml/07_leadership_unknown.yaml b/tests/errors/yaml/07_leadership_unknown.yaml new file mode 100644 index 0000000..1cd9a29 --- /dev/null +++ b/tests/errors/yaml/07_leadership_unknown.yaml @@ -0,0 +1,4 @@ +--- +leadership: + - leader: test + unknwon: test diff --git a/tests/errors/yaml/07_leadership_wrong_len.yaml b/tests/errors/yaml/07_leadership_wrong_len.yaml new file mode 100644 index 0000000..f4c0428 --- /dev/null +++ b/tests/errors/yaml/07_leadership_wrong_len.yaml @@ -0,0 +1,5 @@ +--- +leadership: + - leader: test + follower: test1 + - follower: test1 diff --git a/tests/results/04_5disabled_calculation_variable_multi3/errors/all.json b/tests/results/00_0no_variable/errors/all.json similarity index 100% rename from tests/results/04_5disabled_calculation_variable_multi3/errors/all.json rename to tests/results/00_0no_variable/errors/all.json diff --git a/tests/results/04_5disabled_calculation_variable_multi2/errors/mandatories.json b/tests/results/00_0no_variable/errors/mandatories.json similarity index 100% rename from tests/results/04_5disabled_calculation_variable_multi2/errors/mandatories.json rename to tests/results/00_0no_variable/errors/mandatories.json diff --git a/tests/results/00_0no_variable/file/all.yml b/tests/results/00_0no_variable/file/all.yml new file mode 100644 index 0000000..9e26dfe --- /dev/null +++ b/tests/results/00_0no_variable/file/all.yml @@ -0,0 +1 @@ +{} \ No newline at end of file diff --git a/tests/results/00_0no_variable/file/all_exclude.yml b/tests/results/00_0no_variable/file/all_exclude.yml new file mode 100644 index 0000000..9e26dfe --- /dev/null +++ b/tests/results/00_0no_variable/file/all_exclude.yml @@ -0,0 +1 @@ +{} \ No newline at end of file diff --git a/tests/results/00_0no_variable/file/mandatories.yml b/tests/results/00_0no_variable/file/mandatories.yml new file mode 100644 index 0000000..9e26dfe --- /dev/null +++ b/tests/results/00_0no_variable/file/mandatories.yml @@ -0,0 +1 @@ +{} \ No newline at end of file diff --git a/tests/results/00_0no_variable/makedict/all.json b/tests/results/00_0no_variable/makedict/all.json new file mode 100644 index 0000000..0967ef4 --- /dev/null +++ b/tests/results/00_0no_variable/makedict/all.json @@ -0,0 +1 @@ +{} diff --git a/tests/results/00_0no_variable/makedict/mandatories.json b/tests/results/00_0no_variable/makedict/mandatories.json new file mode 100644 index 0000000..0967ef4 --- /dev/null +++ b/tests/results/00_0no_variable/makedict/mandatories.json @@ -0,0 +1 @@ +{} diff --git a/tests/results/04_5disabled_calculation_variable_multi3/errors/mandatories.json b/tests/results/00_0no_variable_default_version/errors/all.json similarity index 100% rename from tests/results/04_5disabled_calculation_variable_multi3/errors/mandatories.json rename to tests/results/00_0no_variable_default_version/errors/all.json diff --git a/tests/results/00_0no_variable_default_version/errors/mandatories.json b/tests/results/00_0no_variable_default_version/errors/mandatories.json new file mode 100644 index 0000000..217db0a --- /dev/null +++ b/tests/results/00_0no_variable_default_version/errors/mandatories.json @@ -0,0 +1,4 @@ +{ + "errors": [], + "warnings": [] +} \ No newline at end of file diff --git a/tests/results/00_0no_variable_default_version/file/all.yml b/tests/results/00_0no_variable_default_version/file/all.yml new file mode 100644 index 0000000..9e26dfe --- /dev/null +++ b/tests/results/00_0no_variable_default_version/file/all.yml @@ -0,0 +1 @@ +{} \ No newline at end of file diff --git a/tests/results/00_0no_variable_default_version/file/all_exclude.yml b/tests/results/00_0no_variable_default_version/file/all_exclude.yml new file mode 100644 index 0000000..9e26dfe --- /dev/null +++ b/tests/results/00_0no_variable_default_version/file/all_exclude.yml @@ -0,0 +1 @@ +{} \ No newline at end of file diff --git a/tests/results/00_0no_variable_default_version/file/mandatories.yml b/tests/results/00_0no_variable_default_version/file/mandatories.yml new file mode 100644 index 0000000..9e26dfe --- /dev/null +++ b/tests/results/00_0no_variable_default_version/file/mandatories.yml @@ -0,0 +1 @@ +{} \ No newline at end of file diff --git a/tests/results/00_0no_variable_default_version/makedict/all.json b/tests/results/00_0no_variable_default_version/makedict/all.json new file mode 100644 index 0000000..0967ef4 --- /dev/null +++ b/tests/results/00_0no_variable_default_version/makedict/all.json @@ -0,0 +1 @@ +{} diff --git a/tests/results/00_0no_variable_default_version/makedict/mandatories.json b/tests/results/00_0no_variable_default_version/makedict/mandatories.json new file mode 100644 index 0000000..0967ef4 --- /dev/null +++ b/tests/results/00_0no_variable_default_version/makedict/mandatories.json @@ -0,0 +1 @@ +{} diff --git a/tests/results/00_0no_variable_remove_version/errors/all.json b/tests/results/00_0no_variable_remove_version/errors/all.json new file mode 100644 index 0000000..217db0a --- /dev/null +++ b/tests/results/00_0no_variable_remove_version/errors/all.json @@ -0,0 +1,4 @@ +{ + "errors": [], + "warnings": [] +} \ No newline at end of file diff --git a/tests/results/00_0no_variable_remove_version/errors/mandatories.json b/tests/results/00_0no_variable_remove_version/errors/mandatories.json new file mode 100644 index 0000000..217db0a --- /dev/null +++ b/tests/results/00_0no_variable_remove_version/errors/mandatories.json @@ -0,0 +1,4 @@ +{ + "errors": [], + "warnings": [] +} \ No newline at end of file diff --git a/tests/results/00_0no_variable_remove_version/file/all.yml b/tests/results/00_0no_variable_remove_version/file/all.yml new file mode 100644 index 0000000..9e26dfe --- /dev/null +++ b/tests/results/00_0no_variable_remove_version/file/all.yml @@ -0,0 +1 @@ +{} \ No newline at end of file diff --git a/tests/results/00_0no_variable_remove_version/file/all_exclude.yml b/tests/results/00_0no_variable_remove_version/file/all_exclude.yml new file mode 100644 index 0000000..9e26dfe --- /dev/null +++ b/tests/results/00_0no_variable_remove_version/file/all_exclude.yml @@ -0,0 +1 @@ +{} \ No newline at end of file diff --git a/tests/results/00_0no_variable_remove_version/file/mandatories.yml b/tests/results/00_0no_variable_remove_version/file/mandatories.yml new file mode 100644 index 0000000..9e26dfe --- /dev/null +++ b/tests/results/00_0no_variable_remove_version/file/mandatories.yml @@ -0,0 +1 @@ +{} \ No newline at end of file diff --git a/tests/results/00_0no_variable_remove_version/makedict/all.json b/tests/results/00_0no_variable_remove_version/makedict/all.json new file mode 100644 index 0000000..0967ef4 --- /dev/null +++ b/tests/results/00_0no_variable_remove_version/makedict/all.json @@ -0,0 +1 @@ +{} diff --git a/tests/results/00_0no_variable_remove_version/makedict/mandatories.json b/tests/results/00_0no_variable_remove_version/makedict/mandatories.json new file mode 100644 index 0000000..0967ef4 --- /dev/null +++ b/tests/results/00_0no_variable_remove_version/makedict/mandatories.json @@ -0,0 +1 @@ +{} diff --git a/tests/results/00_2default_calculated_params_permissive/errors/all.json b/tests/results/00_2default_calculated_params_permissive/errors/all.json new file mode 100644 index 0000000..5aa3abb --- /dev/null +++ b/tests/results/00_2default_calculated_params_permissive/errors/all.json @@ -0,0 +1,9 @@ +{ + "errors": [], + "warnings": [ + "family \"rougail.leadership\" is hidden, \"rougail.leadership.var1\" (a first variable) will be ignored when loading from the YAML file \"tests/results/00_2default_calculated_params_permissive/file/all.yml\"", + "family \"rougail.leadership\" is hidden, \"rougail.leadership.var2\" (a first variable) at index \"0\" will be ignored when loading from the YAML file \"tests/results/00_2default_calculated_params_permissive/file/all.yml\"", + "index \"1\" is greater than the leadership length \"1\" for option \"rougail.leadership.var2\" (a first variable) in the YAML file \"tests/results/00_2default_calculated_params_permissive/file/all.yml\"", + "index \"2\" is greater than the leadership length \"1\" for option \"rougail.leadership.var2\" (a first variable) in the YAML file \"tests/results/00_2default_calculated_params_permissive/file/all.yml\"" + ] +} \ No newline at end of file diff --git a/tests/results/00_2default_calculated_params_permissive/errors/mandatories.json b/tests/results/00_2default_calculated_params_permissive/errors/mandatories.json new file mode 100644 index 0000000..217db0a --- /dev/null +++ b/tests/results/00_2default_calculated_params_permissive/errors/mandatories.json @@ -0,0 +1,4 @@ +{ + "errors": [], + "warnings": [] +} \ No newline at end of file diff --git a/tests/results/00_2default_calculated_params_permissive/file/all.yml b/tests/results/00_2default_calculated_params_permissive/file/all.yml new file mode 100644 index 0000000..75f0aaf --- /dev/null +++ b/tests/results/00_2default_calculated_params_permissive/file/all.yml @@ -0,0 +1,17 @@ +{ + "rougail": { + "leadership": [ + { + "var1": "string1", + "var2": "string1" + }, + { + "var1": "string2" + }, + { + "var1": "string3" + } + ], + "var2": "string1" + } +} \ No newline at end of file diff --git a/tests/results/00_2default_calculated_params_permissive/file/all_exclude.yml b/tests/results/00_2default_calculated_params_permissive/file/all_exclude.yml new file mode 100644 index 0000000..75f0aaf --- /dev/null +++ b/tests/results/00_2default_calculated_params_permissive/file/all_exclude.yml @@ -0,0 +1,17 @@ +{ + "rougail": { + "leadership": [ + { + "var1": "string1", + "var2": "string1" + }, + { + "var1": "string2" + }, + { + "var1": "string3" + } + ], + "var2": "string1" + } +} \ No newline at end of file diff --git a/tests/results/00_2default_calculated_params_permissive/file/mandatories.yml b/tests/results/00_2default_calculated_params_permissive/file/mandatories.yml new file mode 100644 index 0000000..9e26dfe --- /dev/null +++ b/tests/results/00_2default_calculated_params_permissive/file/mandatories.yml @@ -0,0 +1 @@ +{} \ No newline at end of file diff --git a/tests/results/00_2default_calculated_params_permissive/makedict/all.json b/tests/results/00_2default_calculated_params_permissive/makedict/all.json new file mode 100644 index 0000000..2bc5af7 --- /dev/null +++ b/tests/results/00_2default_calculated_params_permissive/makedict/all.json @@ -0,0 +1,9 @@ +{ + "rougail.leadership.var1": [ + { + "rougail.leadership.var1": "a_value", + "rougail.leadership.var2": "a_value" + } + ], + "rougail.var2": "string1" +} diff --git a/tests/results/00_2default_calculated_params_permissive/makedict/mandatories.json b/tests/results/00_2default_calculated_params_permissive/makedict/mandatories.json new file mode 100644 index 0000000..5f6d4c8 --- /dev/null +++ b/tests/results/00_2default_calculated_params_permissive/makedict/mandatories.json @@ -0,0 +1,9 @@ +{ + "rougail.leadership.var1": [ + { + "rougail.leadership.var1": "a_value", + "rougail.leadership.var2": "a_value" + } + ], + "rougail.var2": "a_value" +} diff --git a/tests/results/00_2default_calculated_variable_description/errors/all.json b/tests/results/00_2default_calculated_variable_description/errors/all.json new file mode 100644 index 0000000..217db0a --- /dev/null +++ b/tests/results/00_2default_calculated_variable_description/errors/all.json @@ -0,0 +1,4 @@ +{ + "errors": [], + "warnings": [] +} \ No newline at end of file diff --git a/tests/results/00_2default_calculated_variable_description/errors/mandatories.json b/tests/results/00_2default_calculated_variable_description/errors/mandatories.json new file mode 100644 index 0000000..217db0a --- /dev/null +++ b/tests/results/00_2default_calculated_variable_description/errors/mandatories.json @@ -0,0 +1,4 @@ +{ + "errors": [], + "warnings": [] +} \ No newline at end of file diff --git a/tests/results/00_2default_calculated_variable_description/file/all.yml b/tests/results/00_2default_calculated_variable_description/file/all.yml new file mode 100644 index 0000000..aec7437 --- /dev/null +++ b/tests/results/00_2default_calculated_variable_description/file/all.yml @@ -0,0 +1,6 @@ +{ + "rougail": { + "var1": "string1", + "var2": "string1" + } +} \ No newline at end of file diff --git a/tests/results/00_2default_calculated_variable_description/file/all_exclude.yml b/tests/results/00_2default_calculated_variable_description/file/all_exclude.yml new file mode 100644 index 0000000..aec7437 --- /dev/null +++ b/tests/results/00_2default_calculated_variable_description/file/all_exclude.yml @@ -0,0 +1,6 @@ +{ + "rougail": { + "var1": "string1", + "var2": "string1" + } +} \ No newline at end of file diff --git a/tests/results/00_2default_calculated_variable_description/file/mandatories.yml b/tests/results/00_2default_calculated_variable_description/file/mandatories.yml new file mode 100644 index 0000000..c14309f --- /dev/null +++ b/tests/results/00_2default_calculated_variable_description/file/mandatories.yml @@ -0,0 +1,5 @@ +{ + "rougail": { + "var1": "string1" + } +} \ No newline at end of file diff --git a/tests/results/00_2default_calculated_variable_description/makedict/all.json b/tests/results/00_2default_calculated_variable_description/makedict/all.json new file mode 100644 index 0000000..3471f52 --- /dev/null +++ b/tests/results/00_2default_calculated_variable_description/makedict/all.json @@ -0,0 +1,4 @@ +{ + "rougail.var1": "string1", + "rougail.var2": "string1" +} diff --git a/tests/results/00_2default_calculated_variable_description/makedict/mandatories.json b/tests/results/00_2default_calculated_variable_description/makedict/mandatories.json new file mode 100644 index 0000000..3471f52 --- /dev/null +++ b/tests/results/00_2default_calculated_variable_description/makedict/mandatories.json @@ -0,0 +1,4 @@ +{ + "rougail.var1": "string1", + "rougail.var2": "string1" +} diff --git a/tests/results/04_1auto_save_and_hidden/errors/all.json b/tests/results/04_1auto_save_and_hidden/errors/all.json index 0c9b767..28f8d41 100644 --- a/tests/results/04_1auto_save_and_hidden/errors/all.json +++ b/tests/results/04_1auto_save_and_hidden/errors/all.json @@ -1,6 +1,6 @@ { "errors": [], "warnings": [ - "cannot access to option \"rougail.var\" (autosave variable) because has property \"hidden\" loaded from the YAML file \"tests/results/04_1auto_save_and_hidden/file/all.yml\"" + "variable \"rougail.var\" (autosave variable) is hidden, it will be ignored when loading from the YAML file \"tests/results/04_1auto_save_and_hidden/file/all.yml\"" ] } \ No newline at end of file diff --git a/tests/results/04_1default_calculation_hidden/errors/mandatories.json b/tests/results/04_1default_calculation_hidden/errors/mandatories.json index 247ca53..a1b2535 100644 --- a/tests/results/04_1default_calculation_hidden/errors/mandatories.json +++ b/tests/results/04_1default_calculation_hidden/errors/mandatories.json @@ -1,6 +1,6 @@ { "errors": [], "warnings": [ - "cannot access to option \"rougail.var2\" (a second variable) because has property \"disabled\" loaded from the YAML file \"tests/results/04_1default_calculation_hidden/file/mandatories.yml\"" + "variable \"rougail.var2\" (a second variable) is disabled, it will be ignored when loading from the YAML file \"tests/results/04_1default_calculation_hidden/file/mandatories.yml\"" ] } \ No newline at end of file diff --git a/tests/results/04_1default_calculation_hidden_2/errors/mandatories.json b/tests/results/04_1default_calculation_hidden_2/errors/mandatories.json index b8cefa8..1498aab 100644 --- a/tests/results/04_1default_calculation_hidden_2/errors/mandatories.json +++ b/tests/results/04_1default_calculation_hidden_2/errors/mandatories.json @@ -1,6 +1,6 @@ { "errors": [], "warnings": [ - "cannot access to option \"rougail.var2\" (a second variable) because has property \"disabled\" loaded from the YAML file \"tests/results/04_1default_calculation_hidden_2/file/mandatories.yml\"" + "variable \"rougail.var2\" (a second variable) is disabled, it will be ignored when loading from the YAML file \"tests/results/04_1default_calculation_hidden_2/file/mandatories.yml\"" ] } \ No newline at end of file diff --git a/tests/results/04_1default_calculation_hidden_3/errors/all.json b/tests/results/04_1default_calculation_hidden_3/errors/all.json new file mode 100644 index 0000000..9902366 --- /dev/null +++ b/tests/results/04_1default_calculation_hidden_3/errors/all.json @@ -0,0 +1,7 @@ +{ + "errors": [], + "warnings": [ + "variable \"rougail.var1\" (a first variable) is hidden, it will be ignored when loading from the YAML file \"tests/results/04_1default_calculation_hidden_3/file/all.yml\"", + "variable \"rougail.var2\" (a second variable) is disabled, it will be ignored when loading from the YAML file \"tests/results/04_1default_calculation_hidden_3/file/all.yml\"" + ] +} \ No newline at end of file diff --git a/tests/results/04_1default_calculation_hidden_3/errors/mandatories.json b/tests/results/04_1default_calculation_hidden_3/errors/mandatories.json new file mode 100644 index 0000000..484b490 --- /dev/null +++ b/tests/results/04_1default_calculation_hidden_3/errors/mandatories.json @@ -0,0 +1,6 @@ +{ + "errors": [], + "warnings": [ + "variable \"rougail.var2\" (a second variable) is disabled, it will be ignored when loading from the YAML file \"tests/results/04_1default_calculation_hidden_3/file/mandatories.yml\"" + ] +} \ No newline at end of file diff --git a/tests/results/04_1default_calculation_hidden_3/file/all.yml b/tests/results/04_1default_calculation_hidden_3/file/all.yml new file mode 100644 index 0000000..cc33587 --- /dev/null +++ b/tests/results/04_1default_calculation_hidden_3/file/all.yml @@ -0,0 +1,7 @@ +{ + "rougail": { + "var1": "string1", + "var2": "string1", + "var3": "string1" + } +} \ No newline at end of file diff --git a/tests/results/04_1default_calculation_hidden_3/file/all_exclude.yml b/tests/results/04_1default_calculation_hidden_3/file/all_exclude.yml new file mode 100644 index 0000000..cc33587 --- /dev/null +++ b/tests/results/04_1default_calculation_hidden_3/file/all_exclude.yml @@ -0,0 +1,7 @@ +{ + "rougail": { + "var1": "string1", + "var2": "string1", + "var3": "string1" + } +} \ No newline at end of file diff --git a/tests/results/04_1default_calculation_hidden_3/file/mandatories.yml b/tests/results/04_1default_calculation_hidden_3/file/mandatories.yml new file mode 100644 index 0000000..4d51b74 --- /dev/null +++ b/tests/results/04_1default_calculation_hidden_3/file/mandatories.yml @@ -0,0 +1,5 @@ +{ + "rougail": { + "var2": "string1" + } +} \ No newline at end of file diff --git a/tests/results/04_1default_calculation_hidden_3/makedict/all.json b/tests/results/04_1default_calculation_hidden_3/makedict/all.json new file mode 100644 index 0000000..86d3453 --- /dev/null +++ b/tests/results/04_1default_calculation_hidden_3/makedict/all.json @@ -0,0 +1,4 @@ +{ + "rougail.var1": "value", + "rougail.var3": "string1" +} diff --git a/tests/results/04_1default_calculation_hidden_3/makedict/mandatories.json b/tests/results/04_1default_calculation_hidden_3/makedict/mandatories.json new file mode 100644 index 0000000..022d673 --- /dev/null +++ b/tests/results/04_1default_calculation_hidden_3/makedict/mandatories.json @@ -0,0 +1,4 @@ +{ + "rougail.var1": "value", + "rougail.var3": "value" +} diff --git a/tests/results/04_1default_calculation_hidden_4/errors/all.json b/tests/results/04_1default_calculation_hidden_4/errors/all.json new file mode 100644 index 0000000..1c45369 --- /dev/null +++ b/tests/results/04_1default_calculation_hidden_4/errors/all.json @@ -0,0 +1,6 @@ +{ + "errors": [], + "warnings": [ + "variable \"rougail.var1\" (a first variable) is hidden, it will be ignored when loading from the YAML file \"tests/results/04_1default_calculation_hidden_4/file/all.yml\"" + ] +} \ No newline at end of file diff --git a/tests/results/04_1default_calculation_hidden_4/errors/mandatories.json b/tests/results/04_1default_calculation_hidden_4/errors/mandatories.json new file mode 100644 index 0000000..217db0a --- /dev/null +++ b/tests/results/04_1default_calculation_hidden_4/errors/mandatories.json @@ -0,0 +1,4 @@ +{ + "errors": [], + "warnings": [] +} \ No newline at end of file diff --git a/tests/results/04_1default_calculation_hidden_4/file/all.yml b/tests/results/04_1default_calculation_hidden_4/file/all.yml new file mode 100644 index 0000000..cc33587 --- /dev/null +++ b/tests/results/04_1default_calculation_hidden_4/file/all.yml @@ -0,0 +1,7 @@ +{ + "rougail": { + "var1": "string1", + "var2": "string1", + "var3": "string1" + } +} \ No newline at end of file diff --git a/tests/results/04_1default_calculation_hidden_4/file/all_exclude.yml b/tests/results/04_1default_calculation_hidden_4/file/all_exclude.yml new file mode 100644 index 0000000..cc33587 --- /dev/null +++ b/tests/results/04_1default_calculation_hidden_4/file/all_exclude.yml @@ -0,0 +1,7 @@ +{ + "rougail": { + "var1": "string1", + "var2": "string1", + "var3": "string1" + } +} \ No newline at end of file diff --git a/tests/results/04_1default_calculation_hidden_4/file/mandatories.yml b/tests/results/04_1default_calculation_hidden_4/file/mandatories.yml new file mode 100644 index 0000000..4d51b74 --- /dev/null +++ b/tests/results/04_1default_calculation_hidden_4/file/mandatories.yml @@ -0,0 +1,5 @@ +{ + "rougail": { + "var2": "string1" + } +} \ No newline at end of file diff --git a/tests/results/04_1default_calculation_hidden_4/makedict/all.json b/tests/results/04_1default_calculation_hidden_4/makedict/all.json new file mode 100644 index 0000000..3641a7c --- /dev/null +++ b/tests/results/04_1default_calculation_hidden_4/makedict/all.json @@ -0,0 +1,5 @@ +{ + "rougail.var1": "value", + "rougail.var2": "string1", + "rougail.var3": "string1" +} diff --git a/tests/results/04_1default_calculation_hidden_4/makedict/mandatories.json b/tests/results/04_1default_calculation_hidden_4/makedict/mandatories.json new file mode 100644 index 0000000..2b75c2c --- /dev/null +++ b/tests/results/04_1default_calculation_hidden_4/makedict/mandatories.json @@ -0,0 +1,5 @@ +{ + "rougail.var1": "value", + "rougail.var2": "string1", + "rougail.var3": "value" +} diff --git a/tests/results/04_1default_calculation_hidden_5/errors/all.json b/tests/results/04_1default_calculation_hidden_5/errors/all.json new file mode 100644 index 0000000..aa511e5 --- /dev/null +++ b/tests/results/04_1default_calculation_hidden_5/errors/all.json @@ -0,0 +1,6 @@ +{ + "errors": [], + "warnings": [ + "variable \"rougail.var2\" (a second variable) is hidden, it will be ignored when loading from the YAML file \"tests/results/04_1default_calculation_hidden_5/file/all.yml\"" + ] +} \ No newline at end of file diff --git a/tests/results/04_1default_calculation_hidden_5/errors/mandatories.json b/tests/results/04_1default_calculation_hidden_5/errors/mandatories.json new file mode 100644 index 0000000..1594a38 --- /dev/null +++ b/tests/results/04_1default_calculation_hidden_5/errors/mandatories.json @@ -0,0 +1,6 @@ +{ + "errors": [], + "warnings": [ + "variable \"rougail.var3\" (a third variable) is disabled, it will be ignored when loading from the YAML file \"tests/results/04_1default_calculation_hidden_5/file/mandatories.yml\"" + ] +} \ No newline at end of file diff --git a/tests/results/04_1default_calculation_hidden_5/file/all.yml b/tests/results/04_1default_calculation_hidden_5/file/all.yml new file mode 100644 index 0000000..cc33587 --- /dev/null +++ b/tests/results/04_1default_calculation_hidden_5/file/all.yml @@ -0,0 +1,7 @@ +{ + "rougail": { + "var1": "string1", + "var2": "string1", + "var3": "string1" + } +} \ No newline at end of file diff --git a/tests/results/04_1default_calculation_hidden_5/file/all_exclude.yml b/tests/results/04_1default_calculation_hidden_5/file/all_exclude.yml new file mode 100644 index 0000000..cc33587 --- /dev/null +++ b/tests/results/04_1default_calculation_hidden_5/file/all_exclude.yml @@ -0,0 +1,7 @@ +{ + "rougail": { + "var1": "string1", + "var2": "string1", + "var3": "string1" + } +} \ No newline at end of file diff --git a/tests/results/04_1default_calculation_hidden_5/file/mandatories.yml b/tests/results/04_1default_calculation_hidden_5/file/mandatories.yml new file mode 100644 index 0000000..6ef1006 --- /dev/null +++ b/tests/results/04_1default_calculation_hidden_5/file/mandatories.yml @@ -0,0 +1,5 @@ +{ + "rougail": { + "var3": "string1" + } +} \ No newline at end of file diff --git a/tests/results/04_1default_calculation_hidden_5/makedict/all.json b/tests/results/04_1default_calculation_hidden_5/makedict/all.json new file mode 100644 index 0000000..2fbf52f --- /dev/null +++ b/tests/results/04_1default_calculation_hidden_5/makedict/all.json @@ -0,0 +1,5 @@ +{ + "rougail.var1": "string1", + "rougail.var2": "string1", + "rougail.var3": "string1" +} diff --git a/tests/results/04_1default_calculation_hidden_5/makedict/mandatories.json b/tests/results/04_1default_calculation_hidden_5/makedict/mandatories.json new file mode 100644 index 0000000..17f6479 --- /dev/null +++ b/tests/results/04_1default_calculation_hidden_5/makedict/mandatories.json @@ -0,0 +1,4 @@ +{ + "rougail.var1": "value", + "rougail.var2": "value" +} diff --git a/tests/results/04_1default_calculation_hidden_6/errors/all.json b/tests/results/04_1default_calculation_hidden_6/errors/all.json new file mode 100644 index 0000000..d8dec7b --- /dev/null +++ b/tests/results/04_1default_calculation_hidden_6/errors/all.json @@ -0,0 +1,7 @@ +{ + "errors": [], + "warnings": [ + "variable \"rougail.var2\" (a second variable) is hidden, it will be ignored when loading from the YAML file \"tests/results/04_1default_calculation_hidden_6/file/all.yml\"", + "variable \"rougail.var3\" (a third variable) is disabled, it will be ignored when loading from the YAML file \"tests/results/04_1default_calculation_hidden_6/file/all.yml\"" + ] +} \ No newline at end of file diff --git a/tests/results/04_1default_calculation_hidden_6/errors/mandatories.json b/tests/results/04_1default_calculation_hidden_6/errors/mandatories.json new file mode 100644 index 0000000..217db0a --- /dev/null +++ b/tests/results/04_1default_calculation_hidden_6/errors/mandatories.json @@ -0,0 +1,4 @@ +{ + "errors": [], + "warnings": [] +} \ No newline at end of file diff --git a/tests/results/04_1default_calculation_hidden_6/file/all.yml b/tests/results/04_1default_calculation_hidden_6/file/all.yml new file mode 100644 index 0000000..cc33587 --- /dev/null +++ b/tests/results/04_1default_calculation_hidden_6/file/all.yml @@ -0,0 +1,7 @@ +{ + "rougail": { + "var1": "string1", + "var2": "string1", + "var3": "string1" + } +} \ No newline at end of file diff --git a/tests/results/04_1default_calculation_hidden_6/file/all_exclude.yml b/tests/results/04_1default_calculation_hidden_6/file/all_exclude.yml new file mode 100644 index 0000000..cc33587 --- /dev/null +++ b/tests/results/04_1default_calculation_hidden_6/file/all_exclude.yml @@ -0,0 +1,7 @@ +{ + "rougail": { + "var1": "string1", + "var2": "string1", + "var3": "string1" + } +} \ No newline at end of file diff --git a/tests/results/04_1default_calculation_hidden_6/file/mandatories.yml b/tests/results/04_1default_calculation_hidden_6/file/mandatories.yml new file mode 100644 index 0000000..6ef1006 --- /dev/null +++ b/tests/results/04_1default_calculation_hidden_6/file/mandatories.yml @@ -0,0 +1,5 @@ +{ + "rougail": { + "var3": "string1" + } +} \ No newline at end of file diff --git a/tests/results/04_1default_calculation_hidden_6/makedict/all.json b/tests/results/04_1default_calculation_hidden_6/makedict/all.json new file mode 100644 index 0000000..3471f52 --- /dev/null +++ b/tests/results/04_1default_calculation_hidden_6/makedict/all.json @@ -0,0 +1,4 @@ +{ + "rougail.var1": "string1", + "rougail.var2": "string1" +} diff --git a/tests/results/04_1default_calculation_hidden_6/makedict/mandatories.json b/tests/results/04_1default_calculation_hidden_6/makedict/mandatories.json new file mode 100644 index 0000000..d9c7817 --- /dev/null +++ b/tests/results/04_1default_calculation_hidden_6/makedict/mandatories.json @@ -0,0 +1,5 @@ +{ + "rougail.var1": "value", + "rougail.var2": "value", + "rougail.var3": "string1" +} diff --git a/tests/results/04_5disabled_calculation_optional/errors/all.json b/tests/results/04_5disabled_calculation_optional/errors/all.json index 1875b9d..d701370 100644 --- a/tests/results/04_5disabled_calculation_optional/errors/all.json +++ b/tests/results/04_5disabled_calculation_optional/errors/all.json @@ -1,6 +1,6 @@ { "errors": [], "warnings": [ - "cannot access to option \"rougail.var1\" (a first variable) because has property \"hidden\" (unknown is undefined) loaded from the YAML file \"tests/results/04_5disabled_calculation_optional/file/all.yml\"" + "variable \"rougail.var1\" (a first variable) is hidden, it will be ignored when loading from the YAML file \"tests/results/04_5disabled_calculation_optional/file/all.yml\"" ] } \ No newline at end of file diff --git a/tests/results/04_5disabled_calculation_variable/errors/all.json b/tests/results/04_5disabled_calculation_variable/errors/all.json index 7112b5c..35a73d5 100644 --- a/tests/results/04_5disabled_calculation_variable/errors/all.json +++ b/tests/results/04_5disabled_calculation_variable/errors/all.json @@ -1,6 +1,6 @@ { "errors": [], "warnings": [ - "cannot access to option \"rougail.variable\" (a variable) because has property \"disabled\" loaded from the YAML file \"tests/results/04_5disabled_calculation_variable/file/all.yml\"" + "variable \"rougail.variable\" (a variable) is disabled, it will be ignored when loading from the YAML file \"tests/results/04_5disabled_calculation_variable/file/all.yml\"" ] } \ No newline at end of file diff --git a/tests/results/04_5disabled_calculation_variable2/errors/all.json b/tests/results/04_5disabled_calculation_variable2/errors/all.json index 2333eef..f86dadf 100644 --- a/tests/results/04_5disabled_calculation_variable2/errors/all.json +++ b/tests/results/04_5disabled_calculation_variable2/errors/all.json @@ -1,6 +1,6 @@ { "errors": [], "warnings": [ - "cannot access to option \"rougail.variable\" (a variable) because has property \"disabled\" loaded from the YAML file \"tests/results/04_5disabled_calculation_variable2/file/all.yml\"" + "variable \"rougail.variable\" (a variable) is disabled, it will be ignored when loading from the YAML file \"tests/results/04_5disabled_calculation_variable2/file/all.yml\"" ] } \ No newline at end of file diff --git a/tests/results/04_5disabled_calculation_variable2/errors/mandatories.json b/tests/results/04_5disabled_calculation_variable2/errors/mandatories.json index 0845ea0..8900ce6 100644 --- a/tests/results/04_5disabled_calculation_variable2/errors/mandatories.json +++ b/tests/results/04_5disabled_calculation_variable2/errors/mandatories.json @@ -1,6 +1,6 @@ { "errors": [], "warnings": [ - "cannot access to option \"rougail.variable\" (a variable) because has property \"disabled\" loaded from the YAML file \"tests/results/04_5disabled_calculation_variable2/file/mandatories.yml\"" + "variable \"rougail.variable\" (a variable) is disabled, it will be ignored when loading from the YAML file \"tests/results/04_5disabled_calculation_variable2/file/mandatories.yml\"" ] } \ No newline at end of file diff --git a/tests/results/04_5disabled_calculation_variable3/errors/mandatories.json b/tests/results/04_5disabled_calculation_variable3/errors/mandatories.json index cb58956..042297c 100644 --- a/tests/results/04_5disabled_calculation_variable3/errors/mandatories.json +++ b/tests/results/04_5disabled_calculation_variable3/errors/mandatories.json @@ -1,6 +1,6 @@ { "errors": [], "warnings": [ - "cannot access to option \"rougail.variable\" (a variable) because has property \"disabled\" loaded from the YAML file \"tests/results/04_5disabled_calculation_variable3/file/mandatories.yml\"" + "variable \"rougail.variable\" (a variable) is disabled, it will be ignored when loading from the YAML file \"tests/results/04_5disabled_calculation_variable3/file/mandatories.yml\"" ] } \ No newline at end of file diff --git a/tests/results/04_5disabled_calculation_variable4/errors/all.json b/tests/results/04_5disabled_calculation_variable4/errors/all.json index c9e2293..d12ae93 100644 --- a/tests/results/04_5disabled_calculation_variable4/errors/all.json +++ b/tests/results/04_5disabled_calculation_variable4/errors/all.json @@ -1,6 +1,6 @@ { "errors": [], "warnings": [ - "cannot access to option \"rougail.variable\" (a variable) because has property \"disabled\" loaded from the YAML file \"tests/results/04_5disabled_calculation_variable4/file/all.yml\"" + "variable \"rougail.variable\" (a variable) is disabled, it will be ignored when loading from the YAML file \"tests/results/04_5disabled_calculation_variable4/file/all.yml\"" ] } \ No newline at end of file diff --git a/tests/results/04_5disabled_calculation_variable_multi/errors/all.json b/tests/results/04_5disabled_calculation_variable_multi/errors/all.json index 64be218..4ff750c 100644 --- a/tests/results/04_5disabled_calculation_variable_multi/errors/all.json +++ b/tests/results/04_5disabled_calculation_variable_multi/errors/all.json @@ -1,6 +1,6 @@ { "errors": [], "warnings": [ - "cannot access to option \"rougail.variable\" (a variable) because has property \"disabled\" loaded from the YAML file \"tests/results/04_5disabled_calculation_variable_multi/file/all.yml\"" + "variable \"rougail.variable\" (a variable) is disabled, it will be ignored when loading from the YAML file \"tests/results/04_5disabled_calculation_variable_multi/file/all.yml\"" ] } \ No newline at end of file diff --git a/tests/results/04_5disabled_calculation_variable_multi2/file/all.yml b/tests/results/04_5disabled_calculation_variable_multi2/file/all.yml deleted file mode 100644 index 1c5bd6d..0000000 --- a/tests/results/04_5disabled_calculation_variable_multi2/file/all.yml +++ /dev/null @@ -1,14 +0,0 @@ -{ - "rougail": { - "condition": [ - "string1", - "string2", - "string3" - ], - "variable": [ - "string1", - "string2", - "string3" - ] - } -} \ No newline at end of file diff --git a/tests/results/04_5disabled_calculation_variable_multi2/file/all_exclude.yml b/tests/results/04_5disabled_calculation_variable_multi2/file/all_exclude.yml deleted file mode 100644 index 1c5bd6d..0000000 --- a/tests/results/04_5disabled_calculation_variable_multi2/file/all_exclude.yml +++ /dev/null @@ -1,14 +0,0 @@ -{ - "rougail": { - "condition": [ - "string1", - "string2", - "string3" - ], - "variable": [ - "string1", - "string2", - "string3" - ] - } -} \ No newline at end of file diff --git a/tests/results/04_5disabled_calculation_variable_multi2/file/mandatories.yml b/tests/results/04_5disabled_calculation_variable_multi2/file/mandatories.yml deleted file mode 100644 index 1c5bd6d..0000000 --- a/tests/results/04_5disabled_calculation_variable_multi2/file/mandatories.yml +++ /dev/null @@ -1,14 +0,0 @@ -{ - "rougail": { - "condition": [ - "string1", - "string2", - "string3" - ], - "variable": [ - "string1", - "string2", - "string3" - ] - } -} \ No newline at end of file diff --git a/tests/results/04_5disabled_calculation_variable_multi2/makedict/all.json b/tests/results/04_5disabled_calculation_variable_multi2/makedict/all.json deleted file mode 100644 index ecaeab7..0000000 --- a/tests/results/04_5disabled_calculation_variable_multi2/makedict/all.json +++ /dev/null @@ -1,12 +0,0 @@ -{ - "rougail.condition": [ - "string1", - "string2", - "string3" - ], - "rougail.variable": [ - "string1", - "string2", - "string3" - ] -} diff --git a/tests/results/04_5disabled_calculation_variable_multi2/makedict/mandatories.json b/tests/results/04_5disabled_calculation_variable_multi2/makedict/mandatories.json deleted file mode 100644 index ecaeab7..0000000 --- a/tests/results/04_5disabled_calculation_variable_multi2/makedict/mandatories.json +++ /dev/null @@ -1,12 +0,0 @@ -{ - "rougail.condition": [ - "string1", - "string2", - "string3" - ], - "rougail.variable": [ - "string1", - "string2", - "string3" - ] -} diff --git a/tests/results/04_5disabled_calculation_variable_multi3/file/all.yml b/tests/results/04_5disabled_calculation_variable_multi3/file/all.yml deleted file mode 100644 index 1c5bd6d..0000000 --- a/tests/results/04_5disabled_calculation_variable_multi3/file/all.yml +++ /dev/null @@ -1,14 +0,0 @@ -{ - "rougail": { - "condition": [ - "string1", - "string2", - "string3" - ], - "variable": [ - "string1", - "string2", - "string3" - ] - } -} \ No newline at end of file diff --git a/tests/results/04_5disabled_calculation_variable_multi3/file/all_exclude.yml b/tests/results/04_5disabled_calculation_variable_multi3/file/all_exclude.yml deleted file mode 100644 index 1c5bd6d..0000000 --- a/tests/results/04_5disabled_calculation_variable_multi3/file/all_exclude.yml +++ /dev/null @@ -1,14 +0,0 @@ -{ - "rougail": { - "condition": [ - "string1", - "string2", - "string3" - ], - "variable": [ - "string1", - "string2", - "string3" - ] - } -} \ No newline at end of file diff --git a/tests/results/04_5disabled_calculation_variable_multi3/file/mandatories.yml b/tests/results/04_5disabled_calculation_variable_multi3/file/mandatories.yml deleted file mode 100644 index e2d5e46..0000000 --- a/tests/results/04_5disabled_calculation_variable_multi3/file/mandatories.yml +++ /dev/null @@ -1,9 +0,0 @@ -{ - "rougail": { - "variable": [ - "string1", - "string2", - "string3" - ] - } -} \ No newline at end of file diff --git a/tests/results/04_5disabled_calculation_variable_multi3/makedict/all.json b/tests/results/04_5disabled_calculation_variable_multi3/makedict/all.json deleted file mode 100644 index ecaeab7..0000000 --- a/tests/results/04_5disabled_calculation_variable_multi3/makedict/all.json +++ /dev/null @@ -1,12 +0,0 @@ -{ - "rougail.condition": [ - "string1", - "string2", - "string3" - ], - "rougail.variable": [ - "string1", - "string2", - "string3" - ] -} diff --git a/tests/results/04_5disabled_calculation_variable_multi3/makedict/mandatories.json b/tests/results/04_5disabled_calculation_variable_multi3/makedict/mandatories.json deleted file mode 100644 index d68ce41..0000000 --- a/tests/results/04_5disabled_calculation_variable_multi3/makedict/mandatories.json +++ /dev/null @@ -1,11 +0,0 @@ -{ - "rougail.condition": [ - "val1", - "val2" - ], - "rougail.variable": [ - "string1", - "string2", - "string3" - ] -} diff --git a/tests/results/04_5hidden_calculation2/errors/all.json b/tests/results/04_5hidden_calculation2/errors/all.json index ed0021d..08464ce 100644 --- a/tests/results/04_5hidden_calculation2/errors/all.json +++ b/tests/results/04_5hidden_calculation2/errors/all.json @@ -1,7 +1,7 @@ { "errors": [], "warnings": [ - "cannot access to option \"rougail.var1\" (a first variable) because has property \"hidden\" (condition is yes) loaded from the YAML file \"tests/results/04_5hidden_calculation2/file/all.yml\"", - "cannot access to option \"rougail.var2\" (a second variable) because has property \"hidden\" (condition is yes) loaded from the YAML file \"tests/results/04_5hidden_calculation2/file/all.yml\"" + "variable \"rougail.var1\" (a first variable) is hidden, it will be ignored when loading from the YAML file \"tests/results/04_5hidden_calculation2/file/all.yml\"", + "variable \"rougail.var2\" (a second variable) is hidden, it will be ignored when loading from the YAML file \"tests/results/04_5hidden_calculation2/file/all.yml\"" ] } \ No newline at end of file diff --git a/tests/results/04_5validators_multi3/errors/all.json b/tests/results/04_5validators_multi3/errors/all.json new file mode 100644 index 0000000..217db0a --- /dev/null +++ b/tests/results/04_5validators_multi3/errors/all.json @@ -0,0 +1,4 @@ +{ + "errors": [], + "warnings": [] +} \ No newline at end of file diff --git a/tests/results/04_5validators_multi3/errors/mandatories.json b/tests/results/04_5validators_multi3/errors/mandatories.json new file mode 100644 index 0000000..217db0a --- /dev/null +++ b/tests/results/04_5validators_multi3/errors/mandatories.json @@ -0,0 +1,4 @@ +{ + "errors": [], + "warnings": [] +} \ No newline at end of file diff --git a/tests/results/04_5validators_multi3/file/all.yml b/tests/results/04_5validators_multi3/file/all.yml new file mode 100644 index 0000000..97fb075 --- /dev/null +++ b/tests/results/04_5validators_multi3/file/all.yml @@ -0,0 +1,7 @@ +{ + "rougail": { + "var1": [ + 0 + ] + } +} \ No newline at end of file diff --git a/tests/results/04_5validators_multi3/file/all_exclude.yml b/tests/results/04_5validators_multi3/file/all_exclude.yml new file mode 100644 index 0000000..97fb075 --- /dev/null +++ b/tests/results/04_5validators_multi3/file/all_exclude.yml @@ -0,0 +1,7 @@ +{ + "rougail": { + "var1": [ + 0 + ] + } +} \ No newline at end of file diff --git a/tests/results/04_5validators_multi3/file/mandatories.yml b/tests/results/04_5validators_multi3/file/mandatories.yml new file mode 100644 index 0000000..9e26dfe --- /dev/null +++ b/tests/results/04_5validators_multi3/file/mandatories.yml @@ -0,0 +1 @@ +{} \ No newline at end of file diff --git a/tests/results/04_5validators_multi3/makedict/all.json b/tests/results/04_5validators_multi3/makedict/all.json new file mode 100644 index 0000000..723e568 --- /dev/null +++ b/tests/results/04_5validators_multi3/makedict/all.json @@ -0,0 +1,5 @@ +{ + "rougail.var1": [ + 0 + ] +} diff --git a/tests/results/04_5validators_multi3/makedict/mandatories.json b/tests/results/04_5validators_multi3/makedict/mandatories.json new file mode 100644 index 0000000..3e228e1 --- /dev/null +++ b/tests/results/04_5validators_multi3/makedict/mandatories.json @@ -0,0 +1,7 @@ +{ + "rougail.var1": [ + 0, + 1, + 2 + ] +} diff --git a/tests/results/16_2family_redefine_calculation/errors/all.json b/tests/results/16_2family_redefine_calculation/errors/all.json index bb6696e..cd65eb6 100644 --- a/tests/results/16_2family_redefine_calculation/errors/all.json +++ b/tests/results/16_2family_redefine_calculation/errors/all.json @@ -1,6 +1,6 @@ { "errors": [], "warnings": [ - "cannot access to optiondescription \"rougail.family\" because has property \"disabled\" (true) loaded from the YAML file \"tests/results/16_2family_redefine_calculation/file/all.yml\"" + "family \"rougail.family\" is disabled, \"rougail.family.var1\" will be ignored when loading from the YAML file \"tests/results/16_2family_redefine_calculation/file/all.yml\"" ] } \ No newline at end of file diff --git a/tests/results/16_2family_redefine_calculation/errors/mandatories.json b/tests/results/16_2family_redefine_calculation/errors/mandatories.json index d0c890a..4279a3c 100644 --- a/tests/results/16_2family_redefine_calculation/errors/mandatories.json +++ b/tests/results/16_2family_redefine_calculation/errors/mandatories.json @@ -1,6 +1,6 @@ { "errors": [], "warnings": [ - "cannot access to optiondescription \"rougail.family\" because has property \"disabled\" (true) loaded from the YAML file \"tests/results/16_2family_redefine_calculation/file/mandatories.yml\"" + "family \"rougail.family\" is disabled, \"rougail.family.var1\" will be ignored when loading from the YAML file \"tests/results/16_2family_redefine_calculation/file/mandatories.yml\"" ] } \ No newline at end of file diff --git a/tests/results/16_2family_redefine_disabled/errors/all.json b/tests/results/16_2family_redefine_disabled/errors/all.json index 502a4ef..96f521b 100644 --- a/tests/results/16_2family_redefine_disabled/errors/all.json +++ b/tests/results/16_2family_redefine_disabled/errors/all.json @@ -1,6 +1,6 @@ { "errors": [], "warnings": [ - "cannot access to optiondescription \"rougail.family\" because has property \"disabled\" loaded from the YAML file \"tests/results/16_2family_redefine_disabled/file/all.yml\"" + "family \"rougail.family\" is disabled, \"rougail.family.var1\" will be ignored when loading from the YAML file \"tests/results/16_2family_redefine_disabled/file/all.yml\"" ] } \ No newline at end of file diff --git a/tests/results/16_2family_redefine_disabled/errors/mandatories.json b/tests/results/16_2family_redefine_disabled/errors/mandatories.json index 78bc7ea..045a841 100644 --- a/tests/results/16_2family_redefine_disabled/errors/mandatories.json +++ b/tests/results/16_2family_redefine_disabled/errors/mandatories.json @@ -1,6 +1,6 @@ { "errors": [], "warnings": [ - "cannot access to optiondescription \"rougail.family\" because has property \"disabled\" loaded from the YAML file \"tests/results/16_2family_redefine_disabled/file/mandatories.yml\"" + "family \"rougail.family\" is disabled, \"rougail.family.var1\" will be ignored when loading from the YAML file \"tests/results/16_2family_redefine_disabled/file/mandatories.yml\"" ] } \ No newline at end of file diff --git a/tests/results/16_5exists_redefine/errors/all.json b/tests/results/16_5exists_redefine/errors/all.json index 2c4cf85..a65b35f 100644 --- a/tests/results/16_5exists_redefine/errors/all.json +++ b/tests/results/16_5exists_redefine/errors/all.json @@ -1,6 +1,6 @@ { "errors": [], "warnings": [ - "cannot access to option \"rougail.var1\" (a first variable) because has property \"hidden\" loaded from the YAML file \"tests/results/16_5exists_redefine/file/all.yml\"" + "variable \"rougail.var1\" (a first variable) is hidden, it will be ignored when loading from the YAML file \"tests/results/16_5exists_redefine/file/all.yml\"" ] } \ No newline at end of file diff --git a/tests/results/16_5redefine_hidden/errors/all.json b/tests/results/16_5redefine_hidden/errors/all.json index 18a5374..5d2c70e 100644 --- a/tests/results/16_5redefine_hidden/errors/all.json +++ b/tests/results/16_5redefine_hidden/errors/all.json @@ -1,6 +1,6 @@ { "errors": [], "warnings": [ - "cannot access to option \"rougail.variable\" (a variable) because has property \"hidden\" loaded from the YAML file \"tests/results/16_5redefine_hidden/file/all.yml\"" + "variable \"rougail.variable\" (a variable) is hidden, it will be ignored when loading from the YAML file \"tests/results/16_5redefine_hidden/file/all.yml\"" ] } \ No newline at end of file diff --git a/tests/results/17_5redefine_leadership/errors/all.json b/tests/results/17_5redefine_leadership/errors/all.json index 93d5350..88f7286 100644 --- a/tests/results/17_5redefine_leadership/errors/all.json +++ b/tests/results/17_5redefine_leadership/errors/all.json @@ -1,6 +1,6 @@ { "errors": [], "warnings": [ - "cannot access to optiondescription \"rougail.leader\" (a leadership) because has property \"hidden\" loaded from the YAML file \"tests/results/17_5redefine_leadership/file/all.yml\"" + "family \"rougail.leader\" (a leadership) is hidden, \"rougail.leader.leader\" (a leader) will be ignored when loading from the YAML file \"tests/results/17_5redefine_leadership/file/all.yml\"" ] } \ No newline at end of file diff --git a/tests/results/20_0family_underscore/errors/all.json b/tests/results/20_0family_underscore/errors/all.json index 005d407..0704517 100644 --- a/tests/results/20_0family_underscore/errors/all.json +++ b/tests/results/20_0family_underscore/errors/all.json @@ -1,11 +1,11 @@ { "errors": [], "warnings": [ - "cannot access to optiondescription \"rougail.my_family\" (This is a great family) because has properties \"disabled\" and \"hidden\" loaded from the YAML file \"tests/results/20_0family_underscore/file/all.yml\"", - "cannot access to optiondescription \"rougail.my_family\" (This is a great family) because has properties \"disabled\" and \"hidden\" loaded from the YAML file \"tests/results/20_0family_underscore/file/all.yml\"", - "cannot access to optiondescription \"rougail.my_family\" (This is a great family) because has properties \"disabled\" and \"hidden\" loaded from the YAML file \"tests/results/20_0family_underscore/file/all.yml\"", - "cannot access to optiondescription \"rougail.my_family\" (This is a great family) because has properties \"disabled\" and \"hidden\" loaded from the YAML file \"tests/results/20_0family_underscore/file/all.yml\"", - "cannot access to optiondescription \"rougail.my_family\" (This is a great family) because has properties \"disabled\" and \"hidden\" loaded from the YAML file \"tests/results/20_0family_underscore/file/all.yml\"", - "cannot access to optiondescription \"rougail.my_family\" (This is a great family) because has properties \"disabled\" and \"hidden\" loaded from the YAML file \"tests/results/20_0family_underscore/file/all.yml\"" + "family \"rougail.my_family\" (This is a great family) is disabled and hidden, \"rougail.my_family.type.my_variable\" will be ignored when loading from the YAML file \"tests/results/20_0family_underscore/file/all.yml\"", + "family \"rougail.my_family\" (This is a great family) is disabled and hidden, \"rougail.my_family.description.my_variable\" will be ignored when loading from the YAML file \"tests/results/20_0family_underscore/file/all.yml\"", + "family \"rougail.my_family\" (This is a great family) is disabled and hidden, \"rougail.my_family.help.my_variable\" will be ignored when loading from the YAML file \"tests/results/20_0family_underscore/file/all.yml\"", + "family \"rougail.my_family\" (This is a great family) is disabled and hidden, \"rougail.my_family.mode.my_variable\" will be ignored when loading from the YAML file \"tests/results/20_0family_underscore/file/all.yml\"", + "family \"rougail.my_family\" (This is a great family) is disabled and hidden, \"rougail.my_family.hidden.my_variable\" will be ignored when loading from the YAML file \"tests/results/20_0family_underscore/file/all.yml\"", + "family \"rougail.my_family\" (This is a great family) is disabled and hidden, \"rougail.my_family.disabled.my_variable\" will be ignored when loading from the YAML file \"tests/results/20_0family_underscore/file/all.yml\"" ] } \ No newline at end of file diff --git a/tests/results/24_0family_hidden_condition_variable_sub_family/errors/all.json b/tests/results/24_0family_hidden_condition_variable_sub_family/errors/all.json index ac850d2..ba9b80c 100644 --- a/tests/results/24_0family_hidden_condition_variable_sub_family/errors/all.json +++ b/tests/results/24_0family_hidden_condition_variable_sub_family/errors/all.json @@ -1,6 +1,6 @@ { "errors": [], "warnings": [ - "cannot access to optiondescription \"rougail.family\" (possibly hidden family) because has property \"hidden\" loaded from the YAML file \"tests/results/24_0family_hidden_condition_variable_sub_family/file/all.yml\"" + "family \"rougail.family\" (possibly hidden family) is hidden, \"rougail.family.subfamily.var1\" (a variable) will be ignored when loading from the YAML file \"tests/results/24_0family_hidden_condition_variable_sub_family/file/all.yml\"" ] } \ No newline at end of file diff --git a/tests/results/24_0family_hidden_condition_with_variable/errors/all.json b/tests/results/24_0family_hidden_condition_with_variable/errors/all.json index b031a7f..ae74bd8 100644 --- a/tests/results/24_0family_hidden_condition_with_variable/errors/all.json +++ b/tests/results/24_0family_hidden_condition_with_variable/errors/all.json @@ -1,6 +1,6 @@ { "errors": [], "warnings": [ - "cannot access to option \"rougail.family.variable\" (a variable) because has property \"hidden\" (condition2 is true) loaded from the YAML file \"tests/results/24_0family_hidden_condition_with_variable/file/all.yml\"" + "variable \"rougail.family.variable\" (a variable) is hidden, it will be ignored when loading from the YAML file \"tests/results/24_0family_hidden_condition_with_variable/file/all.yml\"" ] } \ No newline at end of file diff --git a/tests/results/24_family_disabled_var_hidden/errors/all.json b/tests/results/24_family_disabled_var_hidden/errors/all.json index 9233448..e20a719 100644 --- a/tests/results/24_family_disabled_var_hidden/errors/all.json +++ b/tests/results/24_family_disabled_var_hidden/errors/all.json @@ -1,7 +1,7 @@ { "errors": [], "warnings": [ - "cannot access to optiondescription \"rougail.family\" because has property \"disabled\" loaded from the YAML file \"tests/results/24_family_disabled_var_hidden/file/all.yml\"", - "cannot access to optiondescription \"rougail.family\" because has property \"disabled\" loaded from the YAML file \"tests/results/24_family_disabled_var_hidden/file/all.yml\"" + "family \"rougail.family\" is disabled, \"rougail.family.var1\" (A description) will be ignored when loading from the YAML file \"tests/results/24_family_disabled_var_hidden/file/all.yml\"", + "family \"rougail.family\" is disabled, \"rougail.family.var2\" (A description) will be ignored when loading from the YAML file \"tests/results/24_family_disabled_var_hidden/file/all.yml\"" ] } \ No newline at end of file diff --git a/tests/results/24_family_disabled_var_hidden/errors/mandatories.json b/tests/results/24_family_disabled_var_hidden/errors/mandatories.json index f6658b3..f378a7f 100644 --- a/tests/results/24_family_disabled_var_hidden/errors/mandatories.json +++ b/tests/results/24_family_disabled_var_hidden/errors/mandatories.json @@ -1,6 +1,6 @@ { "errors": [], "warnings": [ - "cannot access to optiondescription \"rougail.family\" because has property \"disabled\" loaded from the YAML file \"tests/results/24_family_disabled_var_hidden/file/mandatories.yml\"" + "family \"rougail.family\" is disabled, \"rougail.family.var2\" (A description) will be ignored when loading from the YAML file \"tests/results/24_family_disabled_var_hidden/file/mandatories.yml\"" ] } \ No newline at end of file diff --git a/tests/results/40_6leadership_follower_multi_no_mandatory/errors/all.json b/tests/results/40_6leadership_follower_multi_no_mandatory/errors/all.json new file mode 100644 index 0000000..217db0a --- /dev/null +++ b/tests/results/40_6leadership_follower_multi_no_mandatory/errors/all.json @@ -0,0 +1,4 @@ +{ + "errors": [], + "warnings": [] +} \ No newline at end of file diff --git a/tests/results/40_6leadership_follower_multi_no_mandatory/errors/mandatories.json b/tests/results/40_6leadership_follower_multi_no_mandatory/errors/mandatories.json new file mode 100644 index 0000000..217db0a --- /dev/null +++ b/tests/results/40_6leadership_follower_multi_no_mandatory/errors/mandatories.json @@ -0,0 +1,4 @@ +{ + "errors": [], + "warnings": [] +} \ No newline at end of file diff --git a/tests/results/40_6leadership_follower_multi_no_mandatory/file/all.yml b/tests/results/40_6leadership_follower_multi_no_mandatory/file/all.yml new file mode 100644 index 0000000..326fdd8 --- /dev/null +++ b/tests/results/40_6leadership_follower_multi_no_mandatory/file/all.yml @@ -0,0 +1,45 @@ +{ + "rougail": { + "leadership": [ + { + "leader": "string1", + "follower1": [ + "string1", + "string2", + "string3" + ], + "follower2": [ + "string1", + "string2", + "string3" + ] + }, + { + "leader": "string2", + "follower1": [ + "string1", + "string2", + "string3" + ], + "follower2": [ + "string1", + "string2", + "string3" + ] + }, + { + "leader": "string3", + "follower1": [ + "string1", + "string2", + "string3" + ], + "follower2": [ + "string1", + "string2", + "string3" + ] + } + ] + } +} \ No newline at end of file diff --git a/tests/results/40_6leadership_follower_multi_no_mandatory/file/all_exclude.yml b/tests/results/40_6leadership_follower_multi_no_mandatory/file/all_exclude.yml new file mode 100644 index 0000000..326fdd8 --- /dev/null +++ b/tests/results/40_6leadership_follower_multi_no_mandatory/file/all_exclude.yml @@ -0,0 +1,45 @@ +{ + "rougail": { + "leadership": [ + { + "leader": "string1", + "follower1": [ + "string1", + "string2", + "string3" + ], + "follower2": [ + "string1", + "string2", + "string3" + ] + }, + { + "leader": "string2", + "follower1": [ + "string1", + "string2", + "string3" + ], + "follower2": [ + "string1", + "string2", + "string3" + ] + }, + { + "leader": "string3", + "follower1": [ + "string1", + "string2", + "string3" + ], + "follower2": [ + "string1", + "string2", + "string3" + ] + } + ] + } +} \ No newline at end of file diff --git a/tests/results/40_6leadership_follower_multi_no_mandatory/file/mandatories.yml b/tests/results/40_6leadership_follower_multi_no_mandatory/file/mandatories.yml new file mode 100644 index 0000000..9e26dfe --- /dev/null +++ b/tests/results/40_6leadership_follower_multi_no_mandatory/file/mandatories.yml @@ -0,0 +1 @@ +{} \ No newline at end of file diff --git a/tests/results/40_6leadership_follower_multi_no_mandatory/makedict/all.json b/tests/results/40_6leadership_follower_multi_no_mandatory/makedict/all.json new file mode 100644 index 0000000..0b6bac3 --- /dev/null +++ b/tests/results/40_6leadership_follower_multi_no_mandatory/makedict/all.json @@ -0,0 +1,43 @@ +{ + "rougail.leadership.leader": [ + { + "rougail.leadership.leader": "string1", + "rougail.leadership.follower1": [ + "string1", + "string2", + "string3" + ], + "rougail.leadership.follower2": [ + "string1", + "string2", + "string3" + ] + }, + { + "rougail.leadership.leader": "string2", + "rougail.leadership.follower1": [ + "string1", + "string2", + "string3" + ], + "rougail.leadership.follower2": [ + "string1", + "string2", + "string3" + ] + }, + { + "rougail.leadership.leader": "string3", + "rougail.leadership.follower1": [ + "string1", + "string2", + "string3" + ], + "rougail.leadership.follower2": [ + "string1", + "string2", + "string3" + ] + } + ] +} diff --git a/tests/results/40_6leadership_follower_multi_no_mandatory/makedict/mandatories.json b/tests/results/40_6leadership_follower_multi_no_mandatory/makedict/mandatories.json new file mode 100644 index 0000000..f41852a --- /dev/null +++ b/tests/results/40_6leadership_follower_multi_no_mandatory/makedict/mandatories.json @@ -0,0 +1,3 @@ +{ + "rougail.leadership.leader": [] +} diff --git a/tests/results/44_0leadership_hidden/errors/all.json b/tests/results/44_0leadership_hidden/errors/all.json index 80ac393..019fd7d 100644 --- a/tests/results/44_0leadership_hidden/errors/all.json +++ b/tests/results/44_0leadership_hidden/errors/all.json @@ -1,6 +1,6 @@ { "errors": [], "warnings": [ - "cannot access to optiondescription \"rougail.leader\" (a leadership) because has property \"hidden\" loaded from the YAML file \"tests/results/44_0leadership_hidden/file/all.yml\"" + "family \"rougail.leader\" (a leadership) is hidden, \"rougail.leader.leader\" (a leader) will be ignored when loading from the YAML file \"tests/results/44_0leadership_hidden/file/all.yml\"" ] } \ No newline at end of file diff --git a/tests/results/44_0leadership_leader_hidden/errors/all.json b/tests/results/44_0leadership_leader_hidden/errors/all.json index 9619f76..5b9fb41 100644 --- a/tests/results/44_0leadership_leader_hidden/errors/all.json +++ b/tests/results/44_0leadership_leader_hidden/errors/all.json @@ -1,6 +1,6 @@ { "errors": [], "warnings": [ - "cannot access to optiondescription \"rougail.leader\" (a leadership) because has property \"hidden\" loaded from the YAML file \"tests/results/44_0leadership_leader_hidden/file/all.yml\"" + "family \"rougail.leader\" (a leadership) is hidden, \"rougail.leader.leader\" (a leader) will be ignored when loading from the YAML file \"tests/results/44_0leadership_leader_hidden/file/all.yml\"" ] } \ No newline at end of file diff --git a/tests/results/44_1leadership_append_hidden_follower/errors/all.json b/tests/results/44_1leadership_append_hidden_follower/errors/all.json index 171212f..3ab4cf6 100644 --- a/tests/results/44_1leadership_append_hidden_follower/errors/all.json +++ b/tests/results/44_1leadership_append_hidden_follower/errors/all.json @@ -1,6 +1,6 @@ { "errors": [], "warnings": [ - "cannot access to optiondescription \"rougail.leader\" (a leadership) because has property \"hidden\" loaded from the YAML file \"tests/results/44_1leadership_append_hidden_follower/file/all.yml\"" + "family \"rougail.leader\" (a leadership) is hidden, \"rougail.leader.leader\" (a leader) will be ignored when loading from the YAML file \"tests/results/44_1leadership_append_hidden_follower/file/all.yml\"" ] } \ No newline at end of file diff --git a/tests/results/44_6leadership_follower_disabled_calculation/errors/mandatories.json b/tests/results/44_6leadership_follower_disabled_calculation/errors/mandatories.json index be22df6..c6a557c 100644 --- a/tests/results/44_6leadership_follower_disabled_calculation/errors/mandatories.json +++ b/tests/results/44_6leadership_follower_disabled_calculation/errors/mandatories.json @@ -1,6 +1,8 @@ { "errors": [], "warnings": [ - "cannot access to option \"rougail.leader.follower\" (a follower) because has property \"disabled\" (disabled) loaded from the YAML file \"tests/results/44_6leadership_follower_disabled_calculation/file/mandatories.yml\"" + "variable \"rougail.leader.follower\" (a follower) at index \"0\" is disabled, it will be ignored when loading from the YAML file \"tests/results/44_6leadership_follower_disabled_calculation/file/mandatories.yml\"", + "variable \"rougail.leader.follower\" (a follower) at index \"1\" is disabled, it will be ignored when loading from the YAML file \"tests/results/44_6leadership_follower_disabled_calculation/file/mandatories.yml\"", + "variable \"rougail.leader.follower\" (a follower) at index \"2\" is disabled, it will be ignored when loading from the YAML file \"tests/results/44_6leadership_follower_disabled_calculation/file/mandatories.yml\"" ] } \ No newline at end of file diff --git a/tests/results/60_0family_hidden/errors/all.json b/tests/results/60_0family_hidden/errors/all.json index 068b7b5..444cbf0 100644 --- a/tests/results/60_0family_hidden/errors/all.json +++ b/tests/results/60_0family_hidden/errors/all.json @@ -1,6 +1,6 @@ { "errors": [], "warnings": [ - "cannot access to optiondescription \"rougail.family\" (a family) because has property \"hidden\" loaded from the YAML file \"tests/results/60_0family_hidden/file/all.yml\"" + "family \"rougail.family\" (a family) is hidden, \"rougail.family.var\" (a variable) will be ignored when loading from the YAML file \"tests/results/60_0family_hidden/file/all.yml\"" ] } \ No newline at end of file diff --git a/tests/results/60_5family_dynamic_calc_suffix_disabled/errors/all.json b/tests/results/60_5family_dynamic_calc_suffix_disabled/errors/all.json index 2e3b8f7..6121520 100644 --- a/tests/results/60_5family_dynamic_calc_suffix_disabled/errors/all.json +++ b/tests/results/60_5family_dynamic_calc_suffix_disabled/errors/all.json @@ -1,6 +1,6 @@ { "errors": [], "warnings": [ - "cannot access to option \"rougail.dynval1.var\" (A dynamic variable) because has property \"disabled\" loaded from the YAML file \"tests/results/60_5family_dynamic_calc_suffix_disabled/file/all.yml\"" + "variable \"rougail.dynval1.var\" (A dynamic variable) is disabled, it will be ignored when loading from the YAML file \"tests/results/60_5family_dynamic_calc_suffix_disabled/file/all.yml\"" ] } \ No newline at end of file diff --git a/tests/results/60_5family_dynamic_calc_suffix_disabled/errors/mandatories.json b/tests/results/60_5family_dynamic_calc_suffix_disabled/errors/mandatories.json index 079486d..4a3ac5e 100644 --- a/tests/results/60_5family_dynamic_calc_suffix_disabled/errors/mandatories.json +++ b/tests/results/60_5family_dynamic_calc_suffix_disabled/errors/mandatories.json @@ -1,6 +1,6 @@ { "errors": [], "warnings": [ - "cannot access to option \"rougail.dynval1.var\" (A dynamic variable) because has property \"disabled\" loaded from the YAML file \"tests/results/60_5family_dynamic_calc_suffix_disabled/file/mandatories.yml\"" + "variable \"rougail.dynval1.var\" (A dynamic variable) is disabled, it will be ignored when loading from the YAML file \"tests/results/60_5family_dynamic_calc_suffix_disabled/file/mandatories.yml\"" ] } \ No newline at end of file diff --git a/tests/results/60_5family_dynamic_calc_suffix_disabled2/errors/all.json b/tests/results/60_5family_dynamic_calc_suffix_disabled2/errors/all.json index be1cd71..7131b59 100644 --- a/tests/results/60_5family_dynamic_calc_suffix_disabled2/errors/all.json +++ b/tests/results/60_5family_dynamic_calc_suffix_disabled2/errors/all.json @@ -1,7 +1,7 @@ { "errors": [], "warnings": [ - "cannot access to option \"rougail.dynval1.var\" (A dynamic variable) because has property \"disabled\" loaded from the YAML file \"tests/results/60_5family_dynamic_calc_suffix_disabled2/file/all.yml\"", - "cannot access to option \"rougail.dynval2.var\" (A dynamic variable) because has property \"disabled\" loaded from the YAML file \"tests/results/60_5family_dynamic_calc_suffix_disabled2/file/all.yml\"" + "variable \"rougail.dynval1.var\" (A dynamic variable) is disabled, it will be ignored when loading from the YAML file \"tests/results/60_5family_dynamic_calc_suffix_disabled2/file/all.yml\"", + "variable \"rougail.dynval2.var\" (A dynamic variable) is disabled, it will be ignored when loading from the YAML file \"tests/results/60_5family_dynamic_calc_suffix_disabled2/file/all.yml\"" ] } \ No newline at end of file diff --git a/tests/results/60_5family_dynamic_calc_suffix_hidden/errors/all.json b/tests/results/60_5family_dynamic_calc_suffix_hidden/errors/all.json new file mode 100644 index 0000000..6ee4112 --- /dev/null +++ b/tests/results/60_5family_dynamic_calc_suffix_hidden/errors/all.json @@ -0,0 +1,7 @@ +{ + "errors": [], + "warnings": [ + "variable \"rougail.dynval1.var\" (A dynamic variable) is hidden, it will be ignored when loading from the YAML file \"tests/results/60_5family_dynamic_calc_suffix_hidden/file/all.yml\"", + "variable \"rougail.dynval2.var\" (A dynamic variable) is hidden, it will be ignored when loading from the YAML file \"tests/results/60_5family_dynamic_calc_suffix_hidden/file/all.yml\"" + ] +} \ No newline at end of file diff --git a/tests/results/60_5family_dynamic_calc_suffix_hidden/errors/mandatories.json b/tests/results/60_5family_dynamic_calc_suffix_hidden/errors/mandatories.json new file mode 100644 index 0000000..217db0a --- /dev/null +++ b/tests/results/60_5family_dynamic_calc_suffix_hidden/errors/mandatories.json @@ -0,0 +1,4 @@ +{ + "errors": [], + "warnings": [] +} \ No newline at end of file diff --git a/tests/results/60_5family_dynamic_calc_suffix_hidden/file/all.yml b/tests/results/60_5family_dynamic_calc_suffix_hidden/file/all.yml new file mode 100644 index 0000000..c2b7777 --- /dev/null +++ b/tests/results/60_5family_dynamic_calc_suffix_hidden/file/all.yml @@ -0,0 +1,15 @@ +{ + "rougail": { + "var1": [ + "val1", + "val2" + ], + "dynval1": { + "var": "string1" + }, + "dynval2": { + "var": "string1" + }, + "var2": "string1" + } +} \ No newline at end of file diff --git a/tests/results/60_5family_dynamic_calc_suffix_hidden/file/all_exclude.yml b/tests/results/60_5family_dynamic_calc_suffix_hidden/file/all_exclude.yml new file mode 100644 index 0000000..ad42f42 --- /dev/null +++ b/tests/results/60_5family_dynamic_calc_suffix_hidden/file/all_exclude.yml @@ -0,0 +1,11 @@ +{ + "rougail": { + "dynval1": { + "var": "string1" + }, + "dynval2": { + "var": "string1" + }, + "var2": "string1" + } +} \ No newline at end of file diff --git a/tests/results/60_5family_dynamic_calc_suffix_hidden/file/mandatories.yml b/tests/results/60_5family_dynamic_calc_suffix_hidden/file/mandatories.yml new file mode 100644 index 0000000..9e26dfe --- /dev/null +++ b/tests/results/60_5family_dynamic_calc_suffix_hidden/file/mandatories.yml @@ -0,0 +1 @@ +{} \ No newline at end of file diff --git a/tests/results/60_5family_dynamic_calc_suffix_hidden/makedict/all.json b/tests/results/60_5family_dynamic_calc_suffix_hidden/makedict/all.json new file mode 100644 index 0000000..3b5f3fd --- /dev/null +++ b/tests/results/60_5family_dynamic_calc_suffix_hidden/makedict/all.json @@ -0,0 +1,9 @@ +{ + "rougail.var1": [ + "val1", + "val2" + ], + "rougail.dynval1.var": "a value", + "rougail.dynval2.var": "a value", + "rougail.var2": "string1" +} diff --git a/tests/results/60_5family_dynamic_calc_suffix_hidden/makedict/mandatories.json b/tests/results/60_5family_dynamic_calc_suffix_hidden/makedict/mandatories.json new file mode 100644 index 0000000..4755869 --- /dev/null +++ b/tests/results/60_5family_dynamic_calc_suffix_hidden/makedict/mandatories.json @@ -0,0 +1,9 @@ +{ + "rougail.var1": [ + "val1", + "val2" + ], + "rougail.dynval1.var": "a value", + "rougail.dynval2.var": "a value", + "rougail.var2": "a value" +} diff --git a/tests/results/60_5family_dynamic_calc_suffix_hidden_boolean/errors/all.json b/tests/results/60_5family_dynamic_calc_suffix_hidden_boolean/errors/all.json new file mode 100644 index 0000000..d420019 --- /dev/null +++ b/tests/results/60_5family_dynamic_calc_suffix_hidden_boolean/errors/all.json @@ -0,0 +1,7 @@ +{ + "errors": [], + "warnings": [ + "variable \"rougail.dynval1.var\" (A dynamic variable) is hidden, it will be ignored when loading from the YAML file \"tests/results/60_5family_dynamic_calc_suffix_hidden_boolean/file/all.yml\"", + "variable \"rougail.dynval2.var\" (A dynamic variable) is hidden, it will be ignored when loading from the YAML file \"tests/results/60_5family_dynamic_calc_suffix_hidden_boolean/file/all.yml\"" + ] +} \ No newline at end of file diff --git a/tests/results/60_5family_dynamic_calc_suffix_hidden_boolean/errors/mandatories.json b/tests/results/60_5family_dynamic_calc_suffix_hidden_boolean/errors/mandatories.json new file mode 100644 index 0000000..217db0a --- /dev/null +++ b/tests/results/60_5family_dynamic_calc_suffix_hidden_boolean/errors/mandatories.json @@ -0,0 +1,4 @@ +{ + "errors": [], + "warnings": [] +} \ No newline at end of file diff --git a/tests/results/60_5family_dynamic_calc_suffix_hidden_boolean/file/all.yml b/tests/results/60_5family_dynamic_calc_suffix_hidden_boolean/file/all.yml new file mode 100644 index 0000000..b96ba12 --- /dev/null +++ b/tests/results/60_5family_dynamic_calc_suffix_hidden_boolean/file/all.yml @@ -0,0 +1,15 @@ +{ + "rougail": { + "var1": [ + "val1", + "val2" + ], + "dynval1": { + "var": true + }, + "dynval2": { + "var": true + }, + "var2": true + } +} \ No newline at end of file diff --git a/tests/results/60_5family_dynamic_calc_suffix_hidden_boolean/file/all_exclude.yml b/tests/results/60_5family_dynamic_calc_suffix_hidden_boolean/file/all_exclude.yml new file mode 100644 index 0000000..4db334f --- /dev/null +++ b/tests/results/60_5family_dynamic_calc_suffix_hidden_boolean/file/all_exclude.yml @@ -0,0 +1,11 @@ +{ + "rougail": { + "dynval1": { + "var": true + }, + "dynval2": { + "var": true + }, + "var2": true + } +} \ No newline at end of file diff --git a/tests/results/60_5family_dynamic_calc_suffix_hidden_boolean/file/mandatories.yml b/tests/results/60_5family_dynamic_calc_suffix_hidden_boolean/file/mandatories.yml new file mode 100644 index 0000000..9e26dfe --- /dev/null +++ b/tests/results/60_5family_dynamic_calc_suffix_hidden_boolean/file/mandatories.yml @@ -0,0 +1 @@ +{} \ No newline at end of file diff --git a/tests/results/60_5family_dynamic_calc_suffix_hidden_boolean/makedict/all.json b/tests/results/60_5family_dynamic_calc_suffix_hidden_boolean/makedict/all.json new file mode 100644 index 0000000..d172c2d --- /dev/null +++ b/tests/results/60_5family_dynamic_calc_suffix_hidden_boolean/makedict/all.json @@ -0,0 +1,9 @@ +{ + "rougail.var1": [ + "val1", + "val2" + ], + "rougail.dynval1.var": true, + "rougail.dynval2.var": true, + "rougail.var2": true +} diff --git a/tests/results/60_5family_dynamic_calc_suffix_hidden_boolean/makedict/mandatories.json b/tests/results/60_5family_dynamic_calc_suffix_hidden_boolean/makedict/mandatories.json new file mode 100644 index 0000000..d172c2d --- /dev/null +++ b/tests/results/60_5family_dynamic_calc_suffix_hidden_boolean/makedict/mandatories.json @@ -0,0 +1,9 @@ +{ + "rougail.var1": [ + "val1", + "val2" + ], + "rougail.dynval1.var": true, + "rougail.dynval2.var": true, + "rougail.var2": true +} diff --git a/tests/results/60_5family_dynamic_calc_suffix_hidden_multi/errors/all.json b/tests/results/60_5family_dynamic_calc_suffix_hidden_multi/errors/all.json new file mode 100644 index 0000000..5861af6 --- /dev/null +++ b/tests/results/60_5family_dynamic_calc_suffix_hidden_multi/errors/all.json @@ -0,0 +1,7 @@ +{ + "errors": [], + "warnings": [ + "variable \"rougail.dynval1.var\" (A dynamic variable) is hidden, it will be ignored when loading from the YAML file \"tests/results/60_5family_dynamic_calc_suffix_hidden_multi/file/all.yml\"", + "variable \"rougail.dynval2.var\" (A dynamic variable) is hidden, it will be ignored when loading from the YAML file \"tests/results/60_5family_dynamic_calc_suffix_hidden_multi/file/all.yml\"" + ] +} \ No newline at end of file diff --git a/tests/results/60_5family_dynamic_calc_suffix_hidden_multi/errors/mandatories.json b/tests/results/60_5family_dynamic_calc_suffix_hidden_multi/errors/mandatories.json new file mode 100644 index 0000000..217db0a --- /dev/null +++ b/tests/results/60_5family_dynamic_calc_suffix_hidden_multi/errors/mandatories.json @@ -0,0 +1,4 @@ +{ + "errors": [], + "warnings": [] +} \ No newline at end of file diff --git a/tests/results/60_5family_dynamic_calc_suffix_hidden_multi/file/all.yml b/tests/results/60_5family_dynamic_calc_suffix_hidden_multi/file/all.yml new file mode 100644 index 0000000..aa57d77 --- /dev/null +++ b/tests/results/60_5family_dynamic_calc_suffix_hidden_multi/file/all.yml @@ -0,0 +1,27 @@ +{ + "rougail": { + "var1": [ + "val1", + "val2" + ], + "dynval1": { + "var": [ + "string1", + "string2", + "string3" + ] + }, + "dynval2": { + "var": [ + "string1", + "string2", + "string3" + ] + }, + "var2": [ + "string1", + "string2", + "string3" + ] + } +} \ No newline at end of file diff --git a/tests/results/60_5family_dynamic_calc_suffix_hidden_multi/file/all_exclude.yml b/tests/results/60_5family_dynamic_calc_suffix_hidden_multi/file/all_exclude.yml new file mode 100644 index 0000000..06e1f26 --- /dev/null +++ b/tests/results/60_5family_dynamic_calc_suffix_hidden_multi/file/all_exclude.yml @@ -0,0 +1,23 @@ +{ + "rougail": { + "dynval1": { + "var": [ + "string1", + "string2", + "string3" + ] + }, + "dynval2": { + "var": [ + "string1", + "string2", + "string3" + ] + }, + "var2": [ + "string1", + "string2", + "string3" + ] + } +} \ No newline at end of file diff --git a/tests/results/60_5family_dynamic_calc_suffix_hidden_multi/file/mandatories.yml b/tests/results/60_5family_dynamic_calc_suffix_hidden_multi/file/mandatories.yml new file mode 100644 index 0000000..9e26dfe --- /dev/null +++ b/tests/results/60_5family_dynamic_calc_suffix_hidden_multi/file/mandatories.yml @@ -0,0 +1 @@ +{} \ No newline at end of file diff --git a/tests/results/60_5family_dynamic_calc_suffix_hidden_multi/makedict/all.json b/tests/results/60_5family_dynamic_calc_suffix_hidden_multi/makedict/all.json new file mode 100644 index 0000000..3c58e6d --- /dev/null +++ b/tests/results/60_5family_dynamic_calc_suffix_hidden_multi/makedict/all.json @@ -0,0 +1,19 @@ +{ + "rougail.var1": [ + "val1", + "val2" + ], + "rougail.dynval1.var": [ + "a value", + "a second value" + ], + "rougail.dynval2.var": [ + "a value", + "a second value" + ], + "rougail.var2": [ + "string1", + "string2", + "string3" + ] +} diff --git a/tests/results/60_5family_dynamic_calc_suffix_hidden_multi/makedict/mandatories.json b/tests/results/60_5family_dynamic_calc_suffix_hidden_multi/makedict/mandatories.json new file mode 100644 index 0000000..a241885 --- /dev/null +++ b/tests/results/60_5family_dynamic_calc_suffix_hidden_multi/makedict/mandatories.json @@ -0,0 +1,18 @@ +{ + "rougail.var1": [ + "val1", + "val2" + ], + "rougail.dynval1.var": [ + "a value", + "a second value" + ], + "rougail.dynval2.var": [ + "a value", + "a second value" + ], + "rougail.var2": [ + "a value", + "a second value" + ] +} diff --git a/tests/results/60_5family_dynamic_hidden_suffix/errors/all.json b/tests/results/60_5family_dynamic_hidden_suffix/errors/all.json index 657d339..4c73621 100644 --- a/tests/results/60_5family_dynamic_hidden_suffix/errors/all.json +++ b/tests/results/60_5family_dynamic_hidden_suffix/errors/all.json @@ -1,7 +1,7 @@ { "errors": [], "warnings": [ - "cannot access to optiondescription \"rougail.dynval2\" (a dynamic family) because has property \"hidden\" (disabled) loaded from the YAML file \"tests/results/60_5family_dynamic_hidden_suffix/file/all.yml\"", - "cannot access to optiondescription \"rougail.dynval2\" (a dynamic family) because has property \"hidden\" (disabled) loaded from the YAML file \"tests/results/60_5family_dynamic_hidden_suffix/file/all.yml\"" + "family \"rougail.dynval2\" (a dynamic family) is hidden, \"rougail.dynval2.var\" (a variable) will be ignored when loading from the YAML file \"tests/results/60_5family_dynamic_hidden_suffix/file/all.yml\"", + "family \"rougail.dynval2\" (a dynamic family) is hidden, \"rougail.dynval2.family.var\" (a new variable) will be ignored when loading from the YAML file \"tests/results/60_5family_dynamic_hidden_suffix/file/all.yml\"" ] } \ No newline at end of file diff --git a/tests/results/60_5family_dynamic_unknown_suffix/errors/all.json b/tests/results/60_5family_dynamic_unknown_suffix/errors/all.json index 066ad5c..e8d359b 100644 --- a/tests/results/60_5family_dynamic_unknown_suffix/errors/all.json +++ b/tests/results/60_5family_dynamic_unknown_suffix/errors/all.json @@ -1,7 +1,7 @@ { "errors": [], "warnings": [ - "cannot access to option \"rougail.val1_dyn.var4\" (a variable 4) because has property \"disabled\" (val4 is not a valid value) loaded from the YAML file \"tests/results/60_5family_dynamic_unknown_suffix/file/all.yml\"", - "cannot access to option \"rougail.val2_dyn.var4\" (a variable 4) because has property \"disabled\" (val4 is not a valid value) loaded from the YAML file \"tests/results/60_5family_dynamic_unknown_suffix/file/all.yml\"" + "variable \"rougail.val1_dyn.var4\" (a variable 4) is disabled, it will be ignored when loading from the YAML file \"tests/results/60_5family_dynamic_unknown_suffix/file/all.yml\"", + "variable \"rougail.val2_dyn.var4\" (a variable 4) is disabled, it will be ignored when loading from the YAML file \"tests/results/60_5family_dynamic_unknown_suffix/file/all.yml\"" ] } \ No newline at end of file diff --git a/tests/results/60_6family_dynamic_sub_dynamic_1_0_2/errors/all.json b/tests/results/60_6family_dynamic_sub_dynamic_1_0_2/errors/all.json new file mode 100644 index 0000000..217db0a --- /dev/null +++ b/tests/results/60_6family_dynamic_sub_dynamic_1_0_2/errors/all.json @@ -0,0 +1,4 @@ +{ + "errors": [], + "warnings": [] +} \ No newline at end of file diff --git a/tests/results/60_6family_dynamic_sub_dynamic_1_0_2/errors/mandatories.json b/tests/results/60_6family_dynamic_sub_dynamic_1_0_2/errors/mandatories.json new file mode 100644 index 0000000..217db0a --- /dev/null +++ b/tests/results/60_6family_dynamic_sub_dynamic_1_0_2/errors/mandatories.json @@ -0,0 +1,4 @@ +{ + "errors": [], + "warnings": [] +} \ No newline at end of file diff --git a/tests/results/60_6family_dynamic_sub_dynamic_1_0_2/file/all.yml b/tests/results/60_6family_dynamic_sub_dynamic_1_0_2/file/all.yml new file mode 100644 index 0000000..dc94004 --- /dev/null +++ b/tests/results/60_6family_dynamic_sub_dynamic_1_0_2/file/all.yml @@ -0,0 +1,24 @@ +{ + "rougail": { + "var": [ + "val1", + "val2" + ], + "val1": { + "val1": { + "var": "string1" + }, + "val2": { + "var": "string1" + } + }, + "val2": { + "val1": { + "var": "string1" + }, + "val2": { + "var": "string1" + } + } + } +} \ No newline at end of file diff --git a/tests/results/60_6family_dynamic_sub_dynamic_1_0_2/file/all_exclude.yml b/tests/results/60_6family_dynamic_sub_dynamic_1_0_2/file/all_exclude.yml new file mode 100644 index 0000000..8c21abd --- /dev/null +++ b/tests/results/60_6family_dynamic_sub_dynamic_1_0_2/file/all_exclude.yml @@ -0,0 +1,20 @@ +{ + "rougail": { + "val1": { + "val1": { + "var": "string1" + }, + "val2": { + "var": "string1" + } + }, + "val2": { + "val1": { + "var": "string1" + }, + "val2": { + "var": "string1" + } + } + } +} \ No newline at end of file diff --git a/tests/results/60_6family_dynamic_sub_dynamic_1_0_2/file/mandatories.yml b/tests/results/60_6family_dynamic_sub_dynamic_1_0_2/file/mandatories.yml new file mode 100644 index 0000000..8c21abd --- /dev/null +++ b/tests/results/60_6family_dynamic_sub_dynamic_1_0_2/file/mandatories.yml @@ -0,0 +1,20 @@ +{ + "rougail": { + "val1": { + "val1": { + "var": "string1" + }, + "val2": { + "var": "string1" + } + }, + "val2": { + "val1": { + "var": "string1" + }, + "val2": { + "var": "string1" + } + } + } +} \ No newline at end of file diff --git a/tests/results/60_6family_dynamic_sub_dynamic_1_0_2/makedict/all.json b/tests/results/60_6family_dynamic_sub_dynamic_1_0_2/makedict/all.json new file mode 100644 index 0000000..b8b0002 --- /dev/null +++ b/tests/results/60_6family_dynamic_sub_dynamic_1_0_2/makedict/all.json @@ -0,0 +1,10 @@ +{ + "rougail.var": [ + "val1", + "val2" + ], + "rougail.val1.val1.var": "string1", + "rougail.val1.val2.var": "string1", + "rougail.val2.val1.var": "string1", + "rougail.val2.val2.var": "string1" +} diff --git a/tests/results/60_6family_dynamic_sub_dynamic_1_0_2/makedict/mandatories.json b/tests/results/60_6family_dynamic_sub_dynamic_1_0_2/makedict/mandatories.json new file mode 100644 index 0000000..b8b0002 --- /dev/null +++ b/tests/results/60_6family_dynamic_sub_dynamic_1_0_2/makedict/mandatories.json @@ -0,0 +1,10 @@ +{ + "rougail.var": [ + "val1", + "val2" + ], + "rougail.val1.val1.var": "string1", + "rougail.val1.val2.var": "string1", + "rougail.val2.val1.var": "string1", + "rougail.val2.val2.var": "string1" +} diff --git a/tests/test_load.py b/tests/test_load.py index a019a25..898f6b0 100644 --- a/tests/test_load.py +++ b/tests/test_load.py @@ -20,7 +20,7 @@ excludes = [ ] test_ok = get_structures_list(excludes) -# test_ok = [Path('../rougail-tests/structures/60_6family_dynamic_sub_dynamic_empty')] +# test_ok = [Path('../rougail-tests/structures/60_5family_dynamic_calc_suffix_hidden')] def idfn(fixture_value): @@ -36,6 +36,7 @@ def _test_dictionaries(test_dir, namespace, ext, *, level, need_exclude=False): rougailconfig = get_rougail_config(test_dir, namespace) if not rougailconfig: return + ##rougailconfig['tiramisu_cache'] = 'p.py' ################################## rougailconfig['step.user_data'] = ['yaml'] ################################## @@ -48,8 +49,8 @@ def _test_dictionaries(test_dir, namespace, ext, *, level, need_exclude=False): config = rougail.run() ################################## root_path = Path('tests') / 'results' / test_dir.name - makedict = root_path / 'makedict' / f'{level}.json' - filename = root_path / 'file' + makedict = root_path / 'makedict' / f'{level}.json' + filename = root_path / 'file' if need_exclude: filename = filename / f'{level}_exclude.{EXT}' else: @@ -61,7 +62,8 @@ def _test_dictionaries(test_dir, namespace, ext, *, level, need_exclude=False): generated_user_data = RougailUserData(config, rougailconfig=rougailconfig).run() errors = rougail.user_datas(generated_user_data) #expected output - with open(Path('tests') / 'results' / test_dir.name / 'makedict' / f'{level}.json') as json_file: + expected_filename = Path('tests') / 'results' / test_dir.name / 'makedict' / f'{level}.json' + with expected_filename.open() as json_file: expected = load(json_file) # here is the effective test errors_file = Path('tests') / 'results' / test_dir.name / 'errors' / f'{level}.json' @@ -77,11 +79,11 @@ def _test_dictionaries(test_dir, namespace, ext, *, level, need_exclude=False): # 'errors': [], # 'warnings': [], # } - assert expected_errors == errors + assert expected_errors == errors, errors_file # config.property.read_only() config_dict = dict(config_to_dict(config.value.get())) - assert expected == config_dict + assert expected == config_dict, expected_filename def populate(filename, makedict_file, rougailconfig, level, need_exclude): @@ -133,7 +135,8 @@ def test_errors(): 'cannot load variable path "dynVal1.var", the identifier "Val1" is not ' 'valid in the YAML file ' '"tests/errors/60_0family_dynamic_upper_char/file/all_exclude.yml"', - 'cannot find "dynVal1" loaded from the YAML file ' + 'variable or family "dynVal1" does not exist, it will be ignored when ' + 'loading from the YAML file ' '"tests/errors/60_0family_dynamic_upper_char/file/all_exclude.yml"', ]} @@ -152,7 +155,39 @@ def test_errors_2(): 'cannot load variable path "dynVal1.var", the identifier "Val1" is not ' 'valid in the YAML file ' '"tests/errors/60_0family_dynamic_upper_char2/file/all_exclude.yml"', - 'cannot find "dynVal1" loaded from the YAML file ' + 'variable or family "dynVal1" does not exist, it will be ignored when ' + 'loading from the YAML file ' '"tests/errors/60_0family_dynamic_upper_char2/file/all_exclude.yml"', ]} ################################## + + +####################################################################### +error_env = list((Path(__file__).parent / 'errors' / 'yaml').glob("*.yaml")) +error_env.sort() + + +@fixture(scope="module", params=error_env, ids=idfn) +def test_file_error(request): + return request.param + + +def test_dictionaries_error(test_file_error): + rougailconfig = get_rougail_config(test_file_error.parent.parent / 'structure') + ################################## + rougailconfig['step.user_data'] = ['yaml'] + rougailconfig['yaml.filename'] = [str(test_file_error)] + rougail = Rougail(rougailconfig) + config = rougail.run() + ################################## + # loads variables in the tiramisu config + generated_user_data = RougailUserData(config, rougailconfig=rougailconfig).run() + errors = rougail.user_datas(generated_user_data) + errors_file = test_file_error.parent.parent / "results" / test_file_error.name + if not errors_file.is_file(): + errors_file.parent.mkdir(parents=True, exist_ok=True) + with open(errors_file, 'a') as json_file: + dump(errors, json_file, indent=4) + with open(errors_file) as json_file: + expected_errors = load(json_file) + assert expected_errors == errors, errors_file