From 2d0039b3f584cf3e3989db030c169fda8fafd371 Mon Sep 17 00:00:00 2001 From: LeoHsiao Date: Sat, 15 Aug 2020 20:29:38 +0800 Subject: [PATCH] Add default parameter value to the function 'runTest' --- tests/bash_tests/utils.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tests/bash_tests/utils.py b/tests/bash_tests/utils.py index c5d08f71..dc2e4580 100644 --- a/tests/bash_tests/utils.py +++ b/tests/bash_tests/utils.py @@ -50,7 +50,7 @@ def is_same_file(file1, file2): return h1 == h2 -def runTest(cmd, vars_dict, expected_returncodes=[0], encoding='utf-8'): +def runTest(cmd, vars_dict=dict(), expected_returncodes=[0], encoding='utf-8'): """ Execute a file in the exiv2 bin directory and return its stdout. """ try: cmd = cmd.format(**vars_dict) @@ -95,7 +95,7 @@ def reportTest(testname, output, encoding='utf-8'): log_error('Reference: {}'.format(reference_output[i])) log_error('Testcase : {}'.format(output[i])) break - + raise RuntimeError('Failed {}'.format(testname))