def test_cast_string_5(): scriptax = ''' test = false; return str(test); ''' block_status, visitor = execute(scriptax) assert block_status.result == "False"
def test_list_3(): scriptax = ''' test = []; return test; ''' block_status, visitor = execute(scriptax) assert block_status.result == []
def test_return_2(): scriptax = ''' test = "worked"; return self.test; ''' block_status, visitor = execute(scriptax) assert block_status.result == "worked"
def test_int(): scriptax = ''' test = 5; return test; ''' block_status, visitor = execute(scriptax) assert block_status.result == 5
def test_import(): scriptax = ''' from scriptax import testing; return true; ''' block_status, visitor = execute(scriptax) assert block_status.result == True
def test_dict_access_3(): scriptax = ''' test = {"5": "worked"}; return test.5; ''' block_status, visitor = execute(scriptax) assert block_status.result == "worked"
def test_negative_int(): scriptax = ''' test = -509; return test; ''' block_status, visitor = execute(scriptax) assert block_status.result == -509
def test_cast_int(): scriptax = ''' test = "5"; return int(test); ''' block_status, visitor = execute(scriptax) assert block_status.result == 5
def test_cast_dec_3(): scriptax = ''' test = "5.8"; return dec(test); ''' block_status, visitor = execute(scriptax) assert block_status.result == 5.8
def test_cast_dict_7(): scriptax = ''' test = true; return dict(test); ''' block_status, visitor = execute(scriptax) assert block_status.result == {"default": True}
def test_cast_dict_8(): scriptax = ''' test = null; return dict(test); ''' block_status, visitor = execute(scriptax) assert block_status.result == {"default": None}
def test_cast_dict_4(): scriptax = ''' test = '{"day": "night", "nottrue": false}'; return dict(test); ''' block_status, visitor = execute(scriptax) assert block_status.result == {"day": "night", "nottrue": False}
def test_cast_list_2(): scriptax = ''' test = ""; return list(test); ''' block_status, visitor = execute(scriptax) assert block_status.result == [""]
def test_cast_string_6(): scriptax = ''' test = null; return str(test); ''' block_status, visitor = execute(scriptax) assert block_status.result == "None"
def test_hex(): scriptax = ''' test = 0xabcdEF1234567890; return test; ''' block_status, visitor = execute(scriptax) assert block_status.result == "0xABCDEF1234567890"
def test_cast_bool_2(): scriptax = ''' test = 0; return bool(test); ''' block_status, visitor = execute(scriptax) assert block_status.result == False
def test_dict(): scriptax = ''' test = {"test": "worked"}; return test; ''' block_status, visitor = execute(scriptax) assert block_status.result == {"test": "worked"}
def test_cast_bool_5(): scriptax = ''' test = "true"; return bool(test); ''' block_status, visitor = execute(scriptax) assert block_status.result == True
def test_complex_object(): scriptax = ''' test = {"test": "worked", "test2": [{"yes": "no"}, {"day": "night"}, {"weekend": ["sunday", {"name": "saturday", "best_day": true}]}]}; return test.test2.2.weekend.1.best_day; ''' block_status, visitor = execute(scriptax) assert block_status.result == True
def test_injection_3(): scriptax = ''' inject = "worked"; return "hi the test <| inject > !"; ''' block_status, visitor = execute(scriptax) assert block_status.result == "hi the test worked !"
def test_big_int(): scriptax = ''' test = 5099327593287521432626; return test; ''' block_status, visitor = execute(scriptax) assert block_status.result == 5099327593287521432626
def test_injection(): scriptax = ''' inject = "worked"; return "<|inject>"; ''' block_status, visitor = execute(scriptax) assert block_status.result == "worked"
def test_import_3(): scriptax = ''' from scriptax import testing as bananas; return bananas.get_test_static(); ''' block_status, visitor = execute(scriptax) assert block_status.result == "worked"
def test_injection_5(): scriptax = ''' inject = true; return "hi the test <| inject > !"; ''' block_status, visitor = execute(scriptax) assert block_status.result == "hi the test True !"
def test_import_4(): scriptax = ''' import testing; return testing.get_test_static(); ''' block_status, visitor = execute(scriptax) assert block_status.result == "worked"
def test_injection_6(): scriptax = ''' inject = 0xabcdef1234567890; return "hi the test <| inject > !"; ''' block_status, visitor = execute(scriptax) assert block_status.result == "hi the test 0xABCDEF1234567890 !"
def test_list_access_3(): scriptax = ''' test = [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10]; return test.5; ''' block_status, visitor = execute(scriptax) assert block_status.result == 5
def test_injection_7(): scriptax = ''' inject = null; return "hi the test <| inject > !"; ''' block_status, visitor = execute(scriptax) assert block_status.result == "hi the test None !"
def test_none(): scriptax = ''' test = null; return test; ''' block_status, visitor = execute(scriptax) assert block_status.result == None
def test_cast_string_4(): scriptax = ''' test = true; return str(test); ''' block_status, visitor = execute(scriptax) assert block_status.result == "True"