Example #1
0
 def test_all_lower_with_single_quote_returns_str(self):
     assert translate_argument("'datetime'") == 'str'
Example #2
0
 def test_str_with_num_returns_str(self):
     assert translate_argument('str2') == 'str'
Example #3
0
 def test_all_lower_with_bracket_returns_text(self):
     assert translate_argument("[datetime") == 'datetime'
Example #4
0
 def test_bool_uppercase_false_converts_to_str_bool(self):
     assert translate_argument('False') == 'bool'
Example #5
0
 def test_var_name_with_numeral_returns_only_var(self):
     assert translate_argument('[datetime2]') == 'datetime'
Example #6
0
 def test_bool_variable_converts_to_str_bool(self):
     assert translate_argument("[bool1]") == 'bool'
Example #7
0
 def test_bool_true_converts_to_str_bool(self):
     assert translate_argument('true') == 'bool'
Example #8
0
 def test_float_converts_to_str_float(self):
     assert translate_argument("1.5") == 'real'
Example #9
0
 def test_real_converts_to_str_real(self):
     assert translate_argument("-7") == 'int'
Example #10
0
 def test_integer_converts_to_str_int(self):
     assert translate_argument("10") == 'int'
Example #11
0
 def test_str_of_int_converts_to_str(self):
     assert translate_argument("\"1234.\"") == 'str'
Example #12
0
 def test_function_call_returns_function_name(self):
     assert translate_argument("DATETIME([datetime0])") == "datetime"
Example #13
0
 def test_all_lower_string_returns_itself(self):
     assert translate_argument("datetime") == "datetime"
Example #14
0
 def test_all_lower_with_double_quote_returns_str(self):
     assert translate_argument("\"datetime\"") == "str"