Update of /cvsroot/pywin32/pywin32/win32/test
In directory sc8-pr-cvs1:/tmp/cvs-serv30347
Modified Files:
testall.py
Log Message:
Make it work with Python 2.2 unittest
Index: testall.py
===================================================================
RCS file: /cvsroot/pywin32/pywin32/win32/test/testall.py,v
retrieving revision 1.1
retrieving revision 1.2
diff -C2 -d -r1.1 -r1.2
*** testall.py 23 Oct 2003 05:17:23 -0000 1.1
--- testall.py 24 Oct 2003 01:49:36 -0000 1.2
***************
*** 8,11 ****
--- 8,12 ----
except NameError:
me = sys.argv[0]
+ me = os.path.abspath(me)
files = os.listdir(os.path.dirname(me))
suite = unittest.TestSuite()
***************
*** 21,24 ****
return suite
if __name__=='__main__':
! unittest.main(argv=sys.argv + ['suite'])
--- 22,29 ----
return suite
+ class CustomLoader(unittest.TestLoader):
+ def loadTestsFromModule(self, module):
+ return suite()
+
if __name__=='__main__':
! unittest.TestProgram(testLoader=CustomLoader())(argv=sys.argv)
|