Example #1
0
 def test_parse(self):
     args = ['${my arg}', '${default}=huhuu', '@{list}', 'invalid${}{}{{']
     parsed = parse_arguments_to_var_dict(args, 'Keyword name')
     assert_equals(parsed['${my arg}'], '')
     assert_equals(parsed['${default}'], 'huhuu')
     assert_equals(parsed['@{list}'], [])
     assert_equals(len(parsed.keys()), 3)
Example #2
0
 def test_parse(self):
     args = ['${my arg}', '${default}=huhuu', '@{list}', 'invalid${}{}{{']
     parsed = parse_arguments_to_var_dict(args, 'Keyword name')
     assert_equals(parsed['${my arg}'], '')
     assert_equals(parsed['${default}'], 'huhuu')
     assert_equals(parsed['@{list}'], [])
     assert_equals(len(parsed.keys()), 3)
Example #3
0
 def get_local_variables(self):
     return parse_arguments_to_var_dict(self._kw.args.value, self._kw.name)
Example #4
0
 def get_local_variables(self):
     return parse_arguments_to_var_dict(self._kw.args.value, self._kw.name)
Example #5
0
 def test_embedded_arguments_with_args(self):
     parsed = parse_arguments_to_var_dict(['${my arg}'], "Here is ${arg} and ${another arg}")
     assert_equals(parsed['${my arg}'], '')
     assert_equals(len(parsed.keys()), 1)
Example #6
0
 def test_embedded_arguments_with_list_var_syntax(self):
     parsed = parse_arguments_to_var_dict([], "Here is ${arg} and @{list arg}")
     assert_equals(parsed['${arg}'], None)
     assert_equals(len(parsed.keys()), 1)
Example #7
0
 def test_embedded_arguments(self):
     parsed = parse_arguments_to_var_dict([], "Here is ${arg} and ${another arg}")
     assert_equals(parsed['${arg}'], None)
     assert_equals(parsed['${another arg}'], None)
     assert_equals(len(parsed.keys()), 2)
Example #8
0
 def test_parse_with_no_args(self):
     parsed = parse_arguments_to_var_dict([], 'Keyword name')
     assert_equals(len(parsed.keys()), 0)
Example #9
0
 def test_embedded_arguments_with_args(self):
     parsed = parse_arguments_to_var_dict(
         ['${my arg}'], "Here is ${arg} and ${another arg}")
     assert_equals(parsed['${my arg}'], '')
     assert_equals(len(parsed.keys()), 1)
Example #10
0
 def test_embedded_arguments_with_list_var_syntax(self):
     parsed = parse_arguments_to_var_dict([],
                                          "Here is ${arg} and @{list arg}")
     assert_equals(parsed['${arg}'], None)
     assert_equals(len(parsed.keys()), 1)
Example #11
0
 def test_embedded_arguments(self):
     parsed = parse_arguments_to_var_dict(
         [], "Here is ${arg} and ${another arg}")
     assert_equals(parsed['${arg}'], None)
     assert_equals(parsed['${another arg}'], None)
     assert_equals(len(parsed.keys()), 2)
Example #12
0
 def test_parse_with_no_args(self):
     parsed = parse_arguments_to_var_dict([], 'Keyword name')
     assert_equals(len(parsed.keys()), 0)