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