# Testing to see what type outranks the other and storing
# the results to type.txt in the same folder as the script
from time import localtime as ltime

str = "BlakJack"
tup = (10, 11)
lst = [10, 11]
i = 21

def test(tst1, tst2):
    win = "%s is worth more than %s"
    lose = " is worth less than "
    none = " is equal to "
    f = open("type.txt", "a")
    if tst1 > tst2:
        f.write(win % (type(tst1), type(tst2))+"\n")
        
    elif tst1 < tst2:
        f.write(repr(type(tst1))+lose+repr(type(tst2))+"\n")
    else:
        f.write(repr(type(tst1))+none+repr(type(tst2))+"\n")
    f.close()
    

date = "D"+repr(ltime()[2])+" M"+repr(ltime()[1])+" Y"+repr(ltime()[0])
time = "H"+repr(ltime()[3])+" M"+repr(ltime()[4])+" Y"+repr(ltime()[5])

types = [str, tup, lst, i]

for x in types:
    for j in range(4):
        test(x,types[j])
f = open("type.txt", "a")
f.write("test done on\n"+date+"\n"+time+"\n\n-----------------------------------------------\n")
f.close()

