Advertisement
Guest User

Untitled

a guest
Dec 6th, 2019
151
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.44 KB | None | 0 0
  1. import os
  2.  
  3. test = 1
  4. while True:
  5.     os.system("python gen.py > input")
  6.     os.system("test.exe < input > output")
  7.     os.system("slow.exe < input > correct")
  8.     output = [i.strip() for i in open("output").readlines()]
  9.     correct = [i.strip() for i in open("correct").readlines()]
  10.     if output != correct:
  11.         print("Error at test", test)
  12.         break
  13.     print("Test", test, "is OK")
  14.     print("-------------------")
  15.     test += 1
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement