diff --git a/parsl/tests/integration/test_parsl_load_default_config.py b/parsl/tests/integration/test_parsl_load_default_config.py index bb9446c4cd..bec81e693e 100644 --- a/parsl/tests/integration/test_parsl_load_default_config.py +++ b/parsl/tests/integration/test_parsl_load_default_config.py @@ -3,7 +3,7 @@ @python_app -def cpu_stress(inputs=[], outputs=[]): +def cpu_stress(inputs=(), outputs=()): s = 0 for i in range(10**8): s += i diff --git a/parsl/tests/manual_tests/test_fan_in_out_htex_remote.py b/parsl/tests/manual_tests/test_fan_in_out_htex_remote.py index 72dc4c7fd7..0b1d270de0 100644 --- a/parsl/tests/manual_tests/test_fan_in_out_htex_remote.py +++ b/parsl/tests/manual_tests/test_fan_in_out_htex_remote.py @@ -56,7 +56,7 @@ def inc(x): @python_app -def add_inc(inputs=[]): +def add_inc(inputs=()): import time start = time.time() sleep_duration = 30.0 diff --git a/parsl/tests/test_aalst_patterns.py b/parsl/tests/test_aalst_patterns.py index 3e6311e350..71aa7c5654 100644 --- a/parsl/tests/test_aalst_patterns.py +++ b/parsl/tests/test_aalst_patterns.py @@ -77,7 +77,7 @@ def slow_increment(x, dur=1): @python_app -def join(inputs=[]): +def join(inputs=()): return sum(inputs) @@ -96,7 +96,7 @@ def sleep_square(x): @python_app -def sum_results(x=[]): +def sum_results(x=()): total = 0 for r in x: total += r.result() @@ -109,12 +109,12 @@ def add(x, y): @python_app -def sum_list(x=[]): +def sum_list(x=()): return sum(x) @python_app -def sum_lists(x=[], y=[], z=[]): +def sum_lists(x=(), y=(), z=()): total = 0 for i in range(len(x)): total += x[i].result() @@ -126,7 +126,7 @@ def sum_lists(x=[], y=[], z=[]): @python_app -def sum_elements(x=[], y=[], z=[]): +def sum_elements(x=(), y=(), z=()): total = 0 for i in range(len(x)): total += x[i].result() diff --git a/parsl/tests/test_docs/test_from_slides.py b/parsl/tests/test_docs/test_from_slides.py index 09f5e86f93..52be69b7b6 100644 --- a/parsl/tests/test_docs/test_from_slides.py +++ b/parsl/tests/test_docs/test_from_slides.py @@ -5,12 +5,12 @@ @bash_app -def echo(message, outputs=[]): +def echo(message, outputs=()): return 'echo {m} &> {o}'.format(m=message, o=outputs[0]) @python_app -def cat(inputs=[]): +def cat(inputs=()): with open(inputs[0].filepath) as f: return f.readlines() diff --git a/parsl/tests/test_docs/test_tutorial_1.py b/parsl/tests/test_docs/test_tutorial_1.py index 5f8906d4ca..6aab5dee85 100644 --- a/parsl/tests/test_docs/test_tutorial_1.py +++ b/parsl/tests/test_docs/test_tutorial_1.py @@ -11,7 +11,7 @@ @bash_app -def sim_mol_dyn(i, dur, outputs=[], stdout=None, stderr=None): +def sim_mol_dyn(i, dur, outputs=(), stdout=None, stderr=None): # The bash app function, requires that the bash script is assigned to the special variable # cmd_line. Positional and Keyword args to the fn() are formatted into the cmd_line string cmd_line = """echo "{0}" > {outputs[0]} diff --git a/parsl/tests/test_docs/test_workflow1.py b/parsl/tests/test_docs/test_workflow1.py index 2678794a3c..f789a1ae62 100644 --- a/parsl/tests/test_docs/test_workflow1.py +++ b/parsl/tests/test_docs/test_workflow1.py @@ -18,7 +18,7 @@ def generate(limit): @bash_app -def save(message, outputs=[]): +def save(message, outputs=()): return 'echo {m} &> {o}'.format(m=message, o=outputs[0]) diff --git a/parsl/tests/test_error_handling/test_rand_fail.py b/parsl/tests/test_error_handling/test_rand_fail.py index 50d58a500d..4b501b1daf 100644 --- a/parsl/tests/test_error_handling/test_rand_fail.py +++ b/parsl/tests/test_error_handling/test_rand_fail.py @@ -14,7 +14,7 @@ def local_config(): @python_app -def sleep_fail(sleep_dur, sleep_rand_max, fail_prob, inputs=[]): +def sleep_fail(sleep_dur, sleep_rand_max, fail_prob, inputs=()): import time import random