import pretend_sorted_array as stu
import cProfile
import time


test_case_file = open('pretend_sorted_array_test_case', 'r')
commands_read = test_case_file.read().splitlines()
test_case_file.close()

test_soln_file = open('pretend_sorted_array_soln','r')
solution_read = test_soln_file.read().splitlines()
solution_read = [int(x) for x in solution_read]
test_soln_file.close()

start = time.time()
stu_ans = stu.pretend_sorted_array(commands_read[:])
end = time.time()
print("Time taken: {}".format(end - start))

assert stu_ans == solution_read

cProfile.run("stu.pretend_sorted_array(commands_read[:])")
  
