# test:none -> none:
# here be tests:
def test():
isPassing = True
import numpy, time
sortMe = list(numpy.random.randint(numpy.random.randint(1000), size=numpy.random.randint(1000)))
jackHarkness = time.time()
bubble(sortMe)
print "bubble time: ", len(sortMe), time.time() - jackHarkness
jackHarkness, passed = time.time(), isSorted(sortMe)
print len(sortMe), time.time() - jackHarkness
isPassing *= passed
if not passed: print "bubble failed"
sortMe = list(numpy.random.randint(numpy.random.randint(1000), size=numpy.random.randint(1000)))
jackHarkness = time.time()
bubblem(sortMe)
print "bubblem time: ", len(sortMe), time.time() - jackHarkness
jackHarkness, passed = time.time(), isSorted(sortMe)
print len(sortMe), time.time() - jackHarkness
isPassing *= passed
if not passed: print "bubblem failed"
if isPassing:
print "All tests have passed"
if __name__ == "__main__": test()