Commit 9763cd5b by Tianqi Yang

test(original): fix runAll.py to remove blackjack if exists

Fix runAll.py to remove test case blackjack if exists
parent 6ad812a5
...@@ -17,7 +17,8 @@ if __name__ == '__main__': ...@@ -17,7 +17,8 @@ if __name__ == '__main__':
names = sys.argv[1:] names = sys.argv[1:]
if len(names) == 0: if len(names) == 0:
names = sorted(os.listdir('.')) names = sorted(os.listdir('.'))
names.remove('blackjack.decaf') if 'blackjack.decaf' in names:
names.remove('blackjack.decaf')
for name in names: for name in names:
bname,ext = os.path.splitext(name) bname,ext = os.path.splitext(name)
if ext != '.decaf': if ext != '.decaf':
...@@ -45,7 +46,7 @@ if __name__ == '__main__': ...@@ -45,7 +46,7 @@ if __name__ == '__main__':
info = 'OK :)' info = 'OK :)'
else: else:
info = 'ERROR!' info = 'ERROR!'
print ('{0:<20}{1}'.format(name,info)) print ('{0:<60}{1}'.format(name,info))
if os.name == 'nt': if os.name == 'nt':
print ('Press Enter to continue...') print ('Press Enter to continue...')
try: try:
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment