def scope_tests(): M.add_public(somearray=Array(2, 5)) M.add_public(**{'def': Array(10)}) assert F['def'](1) == False S.somearray[1, 4] = 3 assert F.somearray(1, 4) == 3 M.add_private('test', somearray=Array(2, 5)) del M.nonexistantvariable vfpfunc.set('procedure', 'time', set_value=True) print(F.localtime()) vfpfunc.set('procedure', 'argparse', set_value=True) S.t = vfpfunc.create_object('Namespace') user_defined_function(False)
def select_tests(): assert DB.select_function(0 if vfpfunc.set('compatible') == 'OFF' else None) == 1 assert DB.select_function(0) == 1 assert DB.select_function(1) == 32767 assert DB.select_function(2) == 0 assert DB.select_function('test') == 0
def set_tests(): assert vfpfunc.set('compatible') == 'OFF' assert vfpfunc.set('compatible', 1) == 'PROMPT'