Skip to content
Snippets Groups Projects
Commit e37d0a44 authored by David Hendriks's avatar David Hendriks
Browse files

added tests for ensemble and test_grid

parent 711e5ed6
No related branches found
No related tags found
No related merge requests found
......@@ -14,7 +14,8 @@ from binarycpython.utils.functions import (
inspect_dict,
merge_dicts,
handle_ensemble_string_to_json,
verbose_print
verbose_print,
extract_ensemble_json_from_string
)
# https://docs.python.org/3/library/unittest.html
......@@ -58,29 +59,6 @@ ensemble_filters_off {8} ensemble_filter_{9} 1 probability 0.1"
return argstring
def extract_ensemble_json_from_string(binary_c_output):
"""
Function to extract the ensemble_json information from a raw binary_c output string
"""
json = None
try:
ensemble_jsons_strings = [
line for line in binary_c_output.splitlines() if line.startswith("ENSEMBLE_JSON")
]
json = handle_ensemble_string_to_json(
ensemble_jsons_strings[0][len("ENSEMBLE_JSON ") :]
)
if len(ensemble_jsons_strings)>1:
verbose_print("Warning: There is more than one line starting with ENSEMBLE_JSON. Taking the first, but you should check this out.",1, 0)
except IndexError:
verbose_print("Error: Couldn't extract the ensemble information from the output string", 0, 0)
return json
#######################################################################################################################################################
### General run_system test
#######################################################################################################################################################
......
This diff is collapsed.
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment