Skip to content
Snippets Groups Projects
Commit 47372428 authored by jgatt's avatar jgatt
Browse files

better docstring monolithic_tests

parent 220b586e
No related branches found
No related tags found
1 merge request!16Merge request multibehavior
Pipeline #5834 passed
......@@ -34,8 +34,9 @@ def make_monolithic_file(user_name, input_json, probability_name, seed=None, red
with open(schedconf_file, 'w+') as error_description_file:
json.dump(error_file, error_description_file)
def monolithics_test(proba_names,names,input_json,seed=None,red_windows=None,yellow_windows=None) :
"""Utility function to launch the test with given parameters and compare the output to their dm_user_replay class equivalent"""
def monolithic_tests(proba_names,names,input_json,seed=None,red_windows=None,yellow_windows=None) :
"""Utility function to launch tests with users who do only one behavior in windows and compare the output to
their dm_user_replay class equivalent"""
schedconf_file = 'test-instances/user_description_file.json'
for proba_name in proba_names:
behavior_name = proba_name.split("_")[-1]
......@@ -82,7 +83,7 @@ def test_dm_user_multi_behavior_mono_behavior_red(platform_multiC):
names = ["user" + str(i + 14) for i in range(3)] + ["user18"]
input_json = ["test/workloads/dyn/user" + str(i + 14) + ".json" for i in range(3)] + [
"test/workloads/dyn/user18.json"]
monolithics_test(proba_names, names, input_json, seed=3, red_windows=[[200000, 300000]])
monolithic_tests(proba_names, names, input_json, seed=3, red_windows=[[200000, 300000]])
def test_dm_user_multi_behavior_mono_behavior_yellow(platform_multiC):
......@@ -91,7 +92,7 @@ def test_dm_user_multi_behavior_mono_behavior_yellow(platform_multiC):
names = ["user" + str(i + 14) for i in range(3)] + ["user18"]
input_json = ["test/workloads/dyn/user" + str(i + 14) + ".json" for i in range(3)] + [
"test/workloads/dyn/user18.json"]
monolithics_test(proba_names, names, input_json, seed=3, yellow_windows=[[200000, 300000]])
monolithic_tests(proba_names, names, input_json, seed=3, yellow_windows=[[200000, 300000]])
def test_dm_user_small_workload(platform_multiC):
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment