From fca36adc7bfb6f294aa2f202cdd97ed4fa0a40f8 Mon Sep 17 00:00:00 2001 From: Emmanuel Garette Date: Mon, 29 Dec 2025 18:10:28 +0100 Subject: [PATCH] fix: update tests --- tests/results/test/01_6string_multi_length.json | 12 ++++++++++++ tests/results/test/20_7help_family.json | 8 ++++++++ .../60_5family_dynamic_calc_description.json | 14 ++++++++++++++ .../test_mandatory/01_6string_multi_length.json | 12 ++++++++++++ .../results/test_mandatory/20_7help_family.json | 8 ++++++++ .../60_5family_dynamic_calc_description.json | 14 ++++++++++++++ .../test_namespace/01_6string_multi_length.json | 14 ++++++++++++++ .../results/test_namespace/20_7help_family.json | 10 ++++++++++ .../60_5family_dynamic_calc_description.json | 16 ++++++++++++++++ .../01_6string_multi_length.json | 14 ++++++++++++++ .../20_7help_family.json | 10 ++++++++++ .../60_5family_dynamic_calc_description.json | 16 ++++++++++++++++ .../00_9default_calculation.json | 2 +- .../01_6string_multi_length.json | 13 +++++++++++++ .../20_7help_family.json | 10 ++++++++++ .../60_5family_dynamic_calc_description.json | 15 +++++++++++++++ .../01_6string_multi_length.json | 14 ++++++++++++++ .../20_7help_family.json | 10 ++++++++++ .../60_5family_dynamic_calc_description.json | 16 ++++++++++++++++ .../00_9default_calculation.json | 2 +- .../01_6string_multi_length.json | 13 +++++++++++++ .../20_7help_family.json | 7 +++++++ .../60_5family_dynamic_calc_description.json | 9 +++++++++ .../test_read_write/00_9default_calculation.json | 2 +- .../test_read_write/01_6string_multi_length.json | 11 +++++++++++ .../results/test_read_write/20_7help_family.json | 8 ++++++++ .../60_5family_dynamic_calc_description.json | 13 +++++++++++++ .../01_6string_multi_length.json | 12 ++++++++++++ .../20_7help_family.json | 8 ++++++++ .../60_5family_dynamic_calc_description.json | 14 ++++++++++++++ .../00_9default_calculation.json | 2 +- .../01_6string_multi_length.json | 11 +++++++++++ .../20_7help_family.json | 7 +++++++ .../60_5family_dynamic_calc_description.json | 9 +++++++++ tests/test_load.py | 1 + 35 files changed, 353 insertions(+), 4 deletions(-) create mode 100644 tests/results/test/01_6string_multi_length.json create mode 100644 tests/results/test/20_7help_family.json create mode 100644 tests/results/test/60_5family_dynamic_calc_description.json create mode 100644 tests/results/test_mandatory/01_6string_multi_length.json create mode 100644 tests/results/test_mandatory/20_7help_family.json create mode 100644 tests/results/test_mandatory/60_5family_dynamic_calc_description.json create mode 100644 tests/results/test_namespace/01_6string_multi_length.json create mode 100644 tests/results/test_namespace/20_7help_family.json create mode 100644 tests/results/test_namespace/60_5family_dynamic_calc_description.json create mode 100644 tests/results/test_namespace_mandatory/01_6string_multi_length.json create mode 100644 tests/results/test_namespace_mandatory/20_7help_family.json create mode 100644 tests/results/test_namespace_mandatory/60_5family_dynamic_calc_description.json create mode 100644 tests/results/test_namespace_read_write/01_6string_multi_length.json create mode 100644 tests/results/test_namespace_read_write/20_7help_family.json create mode 100644 tests/results/test_namespace_read_write/60_5family_dynamic_calc_description.json create mode 100644 tests/results/test_namespace_read_write_mandatory/01_6string_multi_length.json create mode 100644 tests/results/test_namespace_read_write_mandatory/20_7help_family.json create mode 100644 tests/results/test_namespace_read_write_mandatory/60_5family_dynamic_calc_description.json create mode 100644 tests/results/test_namespace_read_write_mandatory_errors/01_6string_multi_length.json create mode 100644 tests/results/test_namespace_read_write_mandatory_errors/20_7help_family.json create mode 100644 tests/results/test_namespace_read_write_mandatory_errors/60_5family_dynamic_calc_description.json create mode 100644 tests/results/test_read_write/01_6string_multi_length.json create mode 100644 tests/results/test_read_write/20_7help_family.json create mode 100644 tests/results/test_read_write/60_5family_dynamic_calc_description.json create mode 100644 tests/results/test_read_write_mandatory/01_6string_multi_length.json create mode 100644 tests/results/test_read_write_mandatory/20_7help_family.json create mode 100644 tests/results/test_read_write_mandatory/60_5family_dynamic_calc_description.json create mode 100644 tests/results/test_read_write_mandatory_errors/01_6string_multi_length.json create mode 100644 tests/results/test_read_write_mandatory_errors/20_7help_family.json create mode 100644 tests/results/test_read_write_mandatory_errors/60_5family_dynamic_calc_description.json diff --git a/tests/results/test/01_6string_multi_length.json b/tests/results/test/01_6string_multi_length.json new file mode 100644 index 0000000..b6de837 --- /dev/null +++ b/tests/results/test/01_6string_multi_length.json @@ -0,0 +1,12 @@ +{ + "var1": [ + "string1", + "string2", + "string3" + ], + "var2": [ + "string1", + "string2", + "string3" + ] +} \ No newline at end of file diff --git a/tests/results/test/20_7help_family.json b/tests/results/test/20_7help_family.json new file mode 100644 index 0000000..7a15905 --- /dev/null +++ b/tests/results/test/20_7help_family.json @@ -0,0 +1,8 @@ +{ + "family1": { + "var": "string1" + }, + "family2": { + "var": "string1" + } +} \ No newline at end of file diff --git a/tests/results/test/60_5family_dynamic_calc_description.json b/tests/results/test/60_5family_dynamic_calc_description.json new file mode 100644 index 0000000..e4b8b6b --- /dev/null +++ b/tests/results/test/60_5family_dynamic_calc_description.json @@ -0,0 +1,14 @@ +{ + "dynval1": { + "var": "string1" + }, + "dynval2": { + "var": "string1" + }, + "var1": "string1", + "var2": [ + "string1", + "string2", + "string3" + ] +} \ No newline at end of file diff --git a/tests/results/test_mandatory/01_6string_multi_length.json b/tests/results/test_mandatory/01_6string_multi_length.json new file mode 100644 index 0000000..b6de837 --- /dev/null +++ b/tests/results/test_mandatory/01_6string_multi_length.json @@ -0,0 +1,12 @@ +{ + "var1": [ + "string1", + "string2", + "string3" + ], + "var2": [ + "string1", + "string2", + "string3" + ] +} \ No newline at end of file diff --git a/tests/results/test_mandatory/20_7help_family.json b/tests/results/test_mandatory/20_7help_family.json new file mode 100644 index 0000000..7a15905 --- /dev/null +++ b/tests/results/test_mandatory/20_7help_family.json @@ -0,0 +1,8 @@ +{ + "family1": { + "var": "string1" + }, + "family2": { + "var": "string1" + } +} \ No newline at end of file diff --git a/tests/results/test_mandatory/60_5family_dynamic_calc_description.json b/tests/results/test_mandatory/60_5family_dynamic_calc_description.json new file mode 100644 index 0000000..e4b8b6b --- /dev/null +++ b/tests/results/test_mandatory/60_5family_dynamic_calc_description.json @@ -0,0 +1,14 @@ +{ + "dynval1": { + "var": "string1" + }, + "dynval2": { + "var": "string1" + }, + "var1": "string1", + "var2": [ + "string1", + "string2", + "string3" + ] +} \ No newline at end of file diff --git a/tests/results/test_namespace/01_6string_multi_length.json b/tests/results/test_namespace/01_6string_multi_length.json new file mode 100644 index 0000000..4b26f8a --- /dev/null +++ b/tests/results/test_namespace/01_6string_multi_length.json @@ -0,0 +1,14 @@ +{ + "rougail": { + "var1": [ + "string1", + "string2", + "string3" + ], + "var2": [ + "string1", + "string2", + "string3" + ] + } +} \ No newline at end of file diff --git a/tests/results/test_namespace/20_7help_family.json b/tests/results/test_namespace/20_7help_family.json new file mode 100644 index 0000000..f789944 --- /dev/null +++ b/tests/results/test_namespace/20_7help_family.json @@ -0,0 +1,10 @@ +{ + "rougail": { + "family1": { + "var": "string1" + }, + "family2": { + "var": "string1" + } + } +} \ No newline at end of file diff --git a/tests/results/test_namespace/60_5family_dynamic_calc_description.json b/tests/results/test_namespace/60_5family_dynamic_calc_description.json new file mode 100644 index 0000000..7158b05 --- /dev/null +++ b/tests/results/test_namespace/60_5family_dynamic_calc_description.json @@ -0,0 +1,16 @@ +{ + "rougail": { + "dynval1": { + "var": "string1" + }, + "dynval2": { + "var": "string1" + }, + "var1": "string1", + "var2": [ + "string1", + "string2", + "string3" + ] + } +} \ No newline at end of file diff --git a/tests/results/test_namespace_mandatory/01_6string_multi_length.json b/tests/results/test_namespace_mandatory/01_6string_multi_length.json new file mode 100644 index 0000000..4b26f8a --- /dev/null +++ b/tests/results/test_namespace_mandatory/01_6string_multi_length.json @@ -0,0 +1,14 @@ +{ + "rougail": { + "var1": [ + "string1", + "string2", + "string3" + ], + "var2": [ + "string1", + "string2", + "string3" + ] + } +} \ No newline at end of file diff --git a/tests/results/test_namespace_mandatory/20_7help_family.json b/tests/results/test_namespace_mandatory/20_7help_family.json new file mode 100644 index 0000000..f789944 --- /dev/null +++ b/tests/results/test_namespace_mandatory/20_7help_family.json @@ -0,0 +1,10 @@ +{ + "rougail": { + "family1": { + "var": "string1" + }, + "family2": { + "var": "string1" + } + } +} \ No newline at end of file diff --git a/tests/results/test_namespace_mandatory/60_5family_dynamic_calc_description.json b/tests/results/test_namespace_mandatory/60_5family_dynamic_calc_description.json new file mode 100644 index 0000000..7158b05 --- /dev/null +++ b/tests/results/test_namespace_mandatory/60_5family_dynamic_calc_description.json @@ -0,0 +1,16 @@ +{ + "rougail": { + "dynval1": { + "var": "string1" + }, + "dynval2": { + "var": "string1" + }, + "var1": "string1", + "var2": [ + "string1", + "string2", + "string3" + ] + } +} \ No newline at end of file diff --git a/tests/results/test_namespace_read_write/00_9default_calculation.json b/tests/results/test_namespace_read_write/00_9default_calculation.json index 8ff7427..91922ed 100644 --- a/tests/results/test_namespace_read_write/00_9default_calculation.json +++ b/tests/results/test_namespace_read_write/00_9default_calculation.json @@ -1,5 +1,5 @@ { "rougail": { - "variable": "string_1_True_None" + "variable": "string_1_True_" } } \ No newline at end of file diff --git a/tests/results/test_namespace_read_write/01_6string_multi_length.json b/tests/results/test_namespace_read_write/01_6string_multi_length.json new file mode 100644 index 0000000..875d23c --- /dev/null +++ b/tests/results/test_namespace_read_write/01_6string_multi_length.json @@ -0,0 +1,13 @@ +{ + "rougail": { + "var1": [ + "val1", + "val2", + "val3" + ], + "var2": [ + "val4", + "val5" + ] + } +} \ No newline at end of file diff --git a/tests/results/test_namespace_read_write/20_7help_family.json b/tests/results/test_namespace_read_write/20_7help_family.json new file mode 100644 index 0000000..23b18b3 --- /dev/null +++ b/tests/results/test_namespace_read_write/20_7help_family.json @@ -0,0 +1,10 @@ +{ + "rougail": { + "family1": { + "var": null + }, + "family2": { + "var": null + } + } +} \ No newline at end of file diff --git a/tests/results/test_namespace_read_write/60_5family_dynamic_calc_description.json b/tests/results/test_namespace_read_write/60_5family_dynamic_calc_description.json new file mode 100644 index 0000000..5607487 --- /dev/null +++ b/tests/results/test_namespace_read_write/60_5family_dynamic_calc_description.json @@ -0,0 +1,15 @@ +{ + "rougail": { + "dynval1": { + "var": null + }, + "dynval2": { + "var": null + }, + "var1": null, + "var2": [ + null, + null + ] + } +} \ No newline at end of file diff --git a/tests/results/test_namespace_read_write_mandatory/01_6string_multi_length.json b/tests/results/test_namespace_read_write_mandatory/01_6string_multi_length.json new file mode 100644 index 0000000..4b26f8a --- /dev/null +++ b/tests/results/test_namespace_read_write_mandatory/01_6string_multi_length.json @@ -0,0 +1,14 @@ +{ + "rougail": { + "var1": [ + "string1", + "string2", + "string3" + ], + "var2": [ + "string1", + "string2", + "string3" + ] + } +} \ No newline at end of file diff --git a/tests/results/test_namespace_read_write_mandatory/20_7help_family.json b/tests/results/test_namespace_read_write_mandatory/20_7help_family.json new file mode 100644 index 0000000..f789944 --- /dev/null +++ b/tests/results/test_namespace_read_write_mandatory/20_7help_family.json @@ -0,0 +1,10 @@ +{ + "rougail": { + "family1": { + "var": "string1" + }, + "family2": { + "var": "string1" + } + } +} \ No newline at end of file diff --git a/tests/results/test_namespace_read_write_mandatory/60_5family_dynamic_calc_description.json b/tests/results/test_namespace_read_write_mandatory/60_5family_dynamic_calc_description.json new file mode 100644 index 0000000..7158b05 --- /dev/null +++ b/tests/results/test_namespace_read_write_mandatory/60_5family_dynamic_calc_description.json @@ -0,0 +1,16 @@ +{ + "rougail": { + "dynval1": { + "var": "string1" + }, + "dynval2": { + "var": "string1" + }, + "var1": "string1", + "var2": [ + "string1", + "string2", + "string3" + ] + } +} \ No newline at end of file diff --git a/tests/results/test_namespace_read_write_mandatory_errors/00_9default_calculation.json b/tests/results/test_namespace_read_write_mandatory_errors/00_9default_calculation.json index 8ff7427..91922ed 100644 --- a/tests/results/test_namespace_read_write_mandatory_errors/00_9default_calculation.json +++ b/tests/results/test_namespace_read_write_mandatory_errors/00_9default_calculation.json @@ -1,5 +1,5 @@ { "rougail": { - "variable": "string_1_True_None" + "variable": "string_1_True_" } } \ No newline at end of file diff --git a/tests/results/test_namespace_read_write_mandatory_errors/01_6string_multi_length.json b/tests/results/test_namespace_read_write_mandatory_errors/01_6string_multi_length.json new file mode 100644 index 0000000..875d23c --- /dev/null +++ b/tests/results/test_namespace_read_write_mandatory_errors/01_6string_multi_length.json @@ -0,0 +1,13 @@ +{ + "rougail": { + "var1": [ + "val1", + "val2", + "val3" + ], + "var2": [ + "val4", + "val5" + ] + } +} \ No newline at end of file diff --git a/tests/results/test_namespace_read_write_mandatory_errors/20_7help_family.json b/tests/results/test_namespace_read_write_mandatory_errors/20_7help_family.json new file mode 100644 index 0000000..8e5a5bb --- /dev/null +++ b/tests/results/test_namespace_read_write_mandatory_errors/20_7help_family.json @@ -0,0 +1,7 @@ +{ + "_errors": [ + "The following variables are mandatory but have no value:", + " - rougail.family1.var", + " - rougail.family2.var" + ] +} \ No newline at end of file diff --git a/tests/results/test_namespace_read_write_mandatory_errors/60_5family_dynamic_calc_description.json b/tests/results/test_namespace_read_write_mandatory_errors/60_5family_dynamic_calc_description.json new file mode 100644 index 0000000..207512a --- /dev/null +++ b/tests/results/test_namespace_read_write_mandatory_errors/60_5family_dynamic_calc_description.json @@ -0,0 +1,9 @@ +{ + "_errors": [ + "The following variables are mandatory but have no value:", + " - rougail.dynval1.var (A dynamic variable for val1)", + " - rougail.dynval2.var (A dynamic variable for val2)", + " - rougail.var1 (A new variable)", + " - rougail.var2 (A new variable)" + ] +} \ No newline at end of file diff --git a/tests/results/test_read_write/00_9default_calculation.json b/tests/results/test_read_write/00_9default_calculation.json index 0d290a8..728f089 100644 --- a/tests/results/test_read_write/00_9default_calculation.json +++ b/tests/results/test_read_write/00_9default_calculation.json @@ -1,3 +1,3 @@ { - "variable": "string_1_True_None" + "variable": "string_1_True_" } \ No newline at end of file diff --git a/tests/results/test_read_write/01_6string_multi_length.json b/tests/results/test_read_write/01_6string_multi_length.json new file mode 100644 index 0000000..4068d6a --- /dev/null +++ b/tests/results/test_read_write/01_6string_multi_length.json @@ -0,0 +1,11 @@ +{ + "var1": [ + "val1", + "val2", + "val3" + ], + "var2": [ + "val4", + "val5" + ] +} \ No newline at end of file diff --git a/tests/results/test_read_write/20_7help_family.json b/tests/results/test_read_write/20_7help_family.json new file mode 100644 index 0000000..a6c6baa --- /dev/null +++ b/tests/results/test_read_write/20_7help_family.json @@ -0,0 +1,8 @@ +{ + "family1": { + "var": null + }, + "family2": { + "var": null + } +} \ No newline at end of file diff --git a/tests/results/test_read_write/60_5family_dynamic_calc_description.json b/tests/results/test_read_write/60_5family_dynamic_calc_description.json new file mode 100644 index 0000000..2afb452 --- /dev/null +++ b/tests/results/test_read_write/60_5family_dynamic_calc_description.json @@ -0,0 +1,13 @@ +{ + "dynval1": { + "var": null + }, + "dynval2": { + "var": null + }, + "var1": null, + "var2": [ + null, + null + ] +} \ No newline at end of file diff --git a/tests/results/test_read_write_mandatory/01_6string_multi_length.json b/tests/results/test_read_write_mandatory/01_6string_multi_length.json new file mode 100644 index 0000000..b6de837 --- /dev/null +++ b/tests/results/test_read_write_mandatory/01_6string_multi_length.json @@ -0,0 +1,12 @@ +{ + "var1": [ + "string1", + "string2", + "string3" + ], + "var2": [ + "string1", + "string2", + "string3" + ] +} \ No newline at end of file diff --git a/tests/results/test_read_write_mandatory/20_7help_family.json b/tests/results/test_read_write_mandatory/20_7help_family.json new file mode 100644 index 0000000..7a15905 --- /dev/null +++ b/tests/results/test_read_write_mandatory/20_7help_family.json @@ -0,0 +1,8 @@ +{ + "family1": { + "var": "string1" + }, + "family2": { + "var": "string1" + } +} \ No newline at end of file diff --git a/tests/results/test_read_write_mandatory/60_5family_dynamic_calc_description.json b/tests/results/test_read_write_mandatory/60_5family_dynamic_calc_description.json new file mode 100644 index 0000000..e4b8b6b --- /dev/null +++ b/tests/results/test_read_write_mandatory/60_5family_dynamic_calc_description.json @@ -0,0 +1,14 @@ +{ + "dynval1": { + "var": "string1" + }, + "dynval2": { + "var": "string1" + }, + "var1": "string1", + "var2": [ + "string1", + "string2", + "string3" + ] +} \ No newline at end of file diff --git a/tests/results/test_read_write_mandatory_errors/00_9default_calculation.json b/tests/results/test_read_write_mandatory_errors/00_9default_calculation.json index 0d290a8..728f089 100644 --- a/tests/results/test_read_write_mandatory_errors/00_9default_calculation.json +++ b/tests/results/test_read_write_mandatory_errors/00_9default_calculation.json @@ -1,3 +1,3 @@ { - "variable": "string_1_True_None" + "variable": "string_1_True_" } \ No newline at end of file diff --git a/tests/results/test_read_write_mandatory_errors/01_6string_multi_length.json b/tests/results/test_read_write_mandatory_errors/01_6string_multi_length.json new file mode 100644 index 0000000..4068d6a --- /dev/null +++ b/tests/results/test_read_write_mandatory_errors/01_6string_multi_length.json @@ -0,0 +1,11 @@ +{ + "var1": [ + "val1", + "val2", + "val3" + ], + "var2": [ + "val4", + "val5" + ] +} \ No newline at end of file diff --git a/tests/results/test_read_write_mandatory_errors/20_7help_family.json b/tests/results/test_read_write_mandatory_errors/20_7help_family.json new file mode 100644 index 0000000..a7c6bf9 --- /dev/null +++ b/tests/results/test_read_write_mandatory_errors/20_7help_family.json @@ -0,0 +1,7 @@ +{ + "_errors": [ + "The following variables are mandatory but have no value:", + " - family1.var", + " - family2.var" + ] +} \ No newline at end of file diff --git a/tests/results/test_read_write_mandatory_errors/60_5family_dynamic_calc_description.json b/tests/results/test_read_write_mandatory_errors/60_5family_dynamic_calc_description.json new file mode 100644 index 0000000..20b144e --- /dev/null +++ b/tests/results/test_read_write_mandatory_errors/60_5family_dynamic_calc_description.json @@ -0,0 +1,9 @@ +{ + "_errors": [ + "The following variables are mandatory but have no value:", + " - dynval1.var (A dynamic variable for val1)", + " - dynval2.var (A dynamic variable for val2)", + " - var1 (A new variable)", + " - var2 (A new variable)" + ] +} \ No newline at end of file diff --git a/tests/test_load.py b/tests/test_load.py index 2af3279..c170195 100644 --- a/tests/test_load.py +++ b/tests/test_load.py @@ -51,6 +51,7 @@ def _test_structural_files(test_dir, namespace, ext, *, read_write=True, mandato ################################## rougail = Rougail(rougailconfig) config = rougail.run() + config.information.set("description_type", "path_and_description") ################################## if do_calc and (mandatory or not read_write): get_values_for_config(config)