Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
26 commits
Select commit Hold shift + click to select a range
ce5b798
Improve nested parameter substitution
namsonx Jul 20, 2023
cd8c671
Merge branch 'namsonx/fixbug/98/memory_interferences' into namsonx/te…
namsonx Jul 20, 2023
d91083c
Merge branch 'namsonx/improvement/76/improve_nested_parameter_substit…
namsonx Jul 20, 2023
9e2abb3
Updates quotes around string value
namsonx Jul 25, 2023
d24bd75
Merge branch 'namsonx/task/80/quotes_around_str_value' into namsonx/t…
namsonx Jul 25, 2023
c9655e8
Merge branch 'namsonx/task/57/update_type_prefix' into namsonx/testin…
namsonx Jul 28, 2023
3f699af
Merge branch 'namsonx/task/84/set_default_python_syntax' into namsonx…
namsonx Jul 28, 2023
19ad45f
Merge branch 'namsonx/task/57/update_type_prefix' into namsonx/testin…
namsonx Jul 31, 2023
ad754b9
Improvement misleading error message when using nested parameter
namsonx Aug 2, 2023
9bbd9b4
Merge branch 'develop' into namsonx/testing/testing_branch
namsonx Aug 2, 2023
27c48fd
Merge branch 'namsonx/improvement/94_95/error_message_in_case_wrong_n…
namsonx Aug 2, 2023
ed355b2
Add additional syntax precheck.
namsonx Aug 2, 2023
ed7ea69
Merge branch 'namsonx/improvement/106/additional_syntax_precheck' int…
namsonx Aug 2, 2023
047d0bb
Update a reason in error message when handling nested parameter
namsonx Aug 2, 2023
3fa74a0
Merge branch 'namsonx/improvement/87/update_errormsg_incase_index_out…
namsonx Aug 2, 2023
83c1652
Update an exception message of syntax precheck method.
namsonx Aug 2, 2023
4f9ee7f
Merge branch 'namsonx/improvement/106/additional_syntax_precheck' int…
namsonx Aug 2, 2023
da9f2a3
Fix the issue cyclic imported JSON file
namsonx Aug 3, 2023
32c0d84
Merge branch 'namsonx/fixbug/78/cyclic_imported_JSON_file' into namso…
namsonx Aug 3, 2023
e4df9ea
Improvement nested parameters handling:
namsonx Aug 8, 2023
9528206
Add tiny change to fix the issue parse nested param
namsonx Aug 8, 2023
117f8a4
Merge branch 'develop' into namsonx/task/stabi_branch
namsonx Aug 9, 2023
0f78084
Merge branch 'develop' into namsonx/task/stabi_branch
namsonx Aug 9, 2023
fb7c372
Initial start of new workflow
HolQue Aug 9, 2023
ecf9e79
Merge pull request #130 from test-fullautomation/HolQue/task/selftest…
namsonx Aug 10, 2023
ec47da7
Tiny change to fix issue for test cases JPP_0300 JPP_0500 JPP_0502 JP…
namsonx Aug 10, 2023
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
274 changes: 178 additions & 96 deletions JsonPreprocessor/CJsonPreprocessor.py

Large diffs are not rendered by default.

16 changes: 8 additions & 8 deletions atest/jsonpreprocessor/test_jsonpreprocessor.py
Original file line number Diff line number Diff line change
Expand Up @@ -348,15 +348,15 @@ def test_none_true_false_datatype(self):
sJsonfile = os.path.abspath("../testdata/config/06_override_params/project_config_04.json")
oJsonPreprocessor = CJsonPreprocessor(syntax="python")
oJsonData = oJsonPreprocessor.jsonLoad(sJsonfile)
assert oJsonData['string_null'] == "null"
assert oJsonData['string_none'] == '"None"'
assert oJsonData['string_true'] == '"True"'
assert oJsonData['string_false'] == '"False"'
assert oJsonData['convert_null_to_string'] == '"None"'
assert oJsonData['convert_none_to_string'] == '"None"'
assert oJsonData['string_null'] == 'null'
assert oJsonData['string_none'] == 'None'
assert oJsonData['string_true'] == 'True'
assert oJsonData['string_false'] == 'False'
assert oJsonData['convert_null_to_string'] == 'None'
assert oJsonData['convert_none_to_string'] == 'None'
assert oJsonData['convert_float_to_string'] == "1.332"
assert oJsonData['convert_true_to_string'] == '"True"'
assert oJsonData['convert_false_to_string'] == '"False"'
assert oJsonData['convert_true_to_string'] == 'True'
assert oJsonData['convert_false_to_string'] == 'False'
assert oJsonData['params']['global'] == JSONFORMAT_NONE_TRUE_FALSE['params']['global']
assert oJsonData['preprocessor']['definitions'] == JSONFORMAT_NONE_TRUE_FALSE['preprocessor']['definitions']

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,6 @@

{
${params}['glo']['globalString']: "Welcome to Jsonpreprocessor Acceptance Test",
"${preprocessor}['definitions']['preproStructure']['variable_01']": 0.192,
${preprocessor}['definitions']['preproStructure']['variable_01']: 0.192,
${Project}: "Acceptance Testing"
}
Original file line number Diff line number Diff line change
Expand Up @@ -14,5 +14,5 @@
//**************************************************************************

{
"${preprocessor}['definitions']['preproTest'][${preprocessor}['definitions']['preproStructure']['variable_02']]": ${params}['glo']['globalString']
${preprocessor}['definitions']['preproTest'][${preprocessor}['definitions']['preproStructure']['variable_02']]: ${params}['glo']['globalString']
}
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,6 @@
{
${sWelcome}: ${Project},
${params}['glo']['globalIntParam']: 69,
${preprocessor}['definitions']['preproStructure']['variable_01']: ${preprocessor}['definitions']['preproStructure']['newStruct']['check1'],
"params": {
"glo": {
"globalFloatParam": 97,
Expand All @@ -37,5 +36,6 @@
"param_01": "Updated new value"
}
}
}
},
${preprocessor}['definitions']['preproStructure']['variable_01']: ${preprocessor}['definitions']['preproStructure']['newStruct']['check1']
}
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
"Project":"JsonPreprocessor",
"Descriptioin":"Json Preprocessor Acceptance Test",
"[import]": "./common/definitions_common.json",
"${gPreproString}": "Override string param in imported file.",
${gPreproString}: "Override string param in imported file.",
"params":{
"global":{
"dSUT":{
Expand Down
2 changes: 1 addition & 1 deletion test/JPP_TestUsecases.html
Original file line number Diff line number Diff line change
Expand Up @@ -860,7 +860,7 @@
</tbody></table></div>
<div>&nbsp;</div>
<hr width="100%" color="#FF8C00" align="center">
<div align="center"><font size="2" color="#27408B">Generated: 09.08.2023 - 11:47:23</font></div>
<div align="center"><font size="2" color="#27408B">Generated: 09.08.2023 - 17:28:15</font></div>
<div>&nbsp;</div>
</body></html>

2 changes: 1 addition & 1 deletion test/JPP_TestUsecases.rst
Original file line number Diff line number Diff line change
Expand Up @@ -273,5 +273,5 @@ Test Use Cases

----

Generated: 09.08.2023 - 11:47:23
Generated: 09.08.2023 - 17:28:15

2 changes: 1 addition & 1 deletion test/JPP_TestUsecases.txt
Original file line number Diff line number Diff line change
Expand Up @@ -119,5 +119,5 @@ Test JPP_0954 / COMMON_SYNTAX_VIOLATIONS / BADCASE
Description: JSON file with syntax error (5): file is empty (multiple pairs of brackets only)
Expectation: No values are returned, and JsonPreprocessor throws an exception
------------------------------------------------------------------------------------------------------------------------
Generated: 09.08.2023 - 11:47:23
Generated: 09.08.2023 - 17:28:15

2 changes: 1 addition & 1 deletion test/pytest/pytestfiles/test_01_DATA_TYPES_GOODCASE.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
#
# XC-CT/ECA3-Queckenstedt
#
# 09.08.2023 - 11:47:23
# 09.08.2023 - 17:28:15
#
# --------------------------------------------------------------------------------------------------------------

Expand Down
2 changes: 1 addition & 1 deletion test/pytest/pytestfiles/test_02_DATA_INTEGRITY_GOODCASE.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
#
# XC-CT/ECA3-Queckenstedt
#
# 09.08.2023 - 11:47:23
# 09.08.2023 - 17:28:15
#
# --------------------------------------------------------------------------------------------------------------

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
#
# XC-CT/ECA3-Queckenstedt
#
# 09.08.2023 - 11:47:23
# 09.08.2023 - 17:28:15
#
# --------------------------------------------------------------------------------------------------------------

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
#
# XC-CT/ECA3-Queckenstedt
#
# 09.08.2023 - 11:47:23
# 09.08.2023 - 17:28:15
#
# --------------------------------------------------------------------------------------------------------------

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
#
# XC-CT/ECA3-Queckenstedt
#
# 09.08.2023 - 11:47:23
# 09.08.2023 - 17:28:15
#
# --------------------------------------------------------------------------------------------------------------

Expand Down
2 changes: 1 addition & 1 deletion test/pytest/pytestfiles/test_06_VALUE_DETECTION_BADCASE.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
#
# XC-CT/ECA3-Queckenstedt
#
# 09.08.2023 - 11:47:23
# 09.08.2023 - 17:28:15
#
# --------------------------------------------------------------------------------------------------------------

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
#
# XC-CT/ECA3-Queckenstedt
#
# 09.08.2023 - 11:47:23
# 09.08.2023 - 17:28:15
#
# --------------------------------------------------------------------------------------------------------------

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
#
# XC-CT/ECA3-Queckenstedt
#
# 09.08.2023 - 11:47:23
# 09.08.2023 - 17:28:15
#
# --------------------------------------------------------------------------------------------------------------

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
#
# XC-CT/ECA3-Queckenstedt
#
# 09.08.2023 - 11:47:23
# 09.08.2023 - 17:28:15
#
# --------------------------------------------------------------------------------------------------------------

Expand Down