Skip to content

Commit

Permalink
Now is not necessary to add ([1],) a tuple when you want to pass a li…
Browse files Browse the repository at this point in the history
…st as parameter (Result handler), just pass your list [1]
  • Loading branch information
acostapazo committed Apr 17, 2020
1 parent 3b2ac21 commit 27ad29c
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 4 deletions.
4 changes: 1 addition & 3 deletions meiga/misc.py
Original file line number Diff line number Diff line change
@@ -1,8 +1,6 @@
def get_args_list(args):
list_args = args
if isinstance(args, tuple):
list_args = list(args)
else:
if not isinstance(args, list):
list_args = [args]
list_args = [args]
return list_args
2 changes: 1 addition & 1 deletion tests/unit/test_result_handle.py
Original file line number Diff line number Diff line change
Expand Up @@ -113,7 +113,7 @@ def run():
@pytest.mark.unit
@pytest.mark.parametrize("result", [isSuccess, isFailure])
def test_should_execute_handler_with_a_list_additional_parameters(result):
given_first_parameter = ([1],)
given_first_parameter = [1]

def on_success(param_1: list):
assert param_1 == [1]
Expand Down

0 comments on commit 27ad29c

Please sign in to comment.