tests/run-tests.py
branchstable
changeset 1072 bbf056e756cc
parent 1068 459c0537273b
child 1084 b668ecd81629
equal deleted inserted replaced
1071:f0ce3dcd5c87 1072:bbf056e756cc
   858         os.remove(err)       # Remove any previous output files
   858         os.remove(err)       # Remove any previous output files
   859     try:
   859     try:
   860         tf = open(testpath)
   860         tf = open(testpath)
   861         firstline = tf.readline().rstrip()
   861         firstline = tf.readline().rstrip()
   862         tf.close()
   862         tf.close()
   863     except:
   863     except IOError:
   864         firstline = ''
   864         firstline = ''
   865     lctest = test.lower()
   865     lctest = test.lower()
   866 
   866 
   867     if lctest.endswith('.py') or firstline == '#!/usr/bin/env python':
   867     if lctest.endswith('.py') or firstline == '#!/usr/bin/env python':
   868         runner = pytest
   868         runner = pytest