Update of /cvsroot/pywin32/pywin32/win32/test
In directory ddv4jf1.ch3.sourceforge.com:/tmp/cvs-serv29773/win32/test
Modified Files:
Tag: py3k
test_exceptions.py
Log Message:
merge more .py changes from the trunk (via 2to3)
Index: test_exceptions.py
===================================================================
RCS file: /cvsroot/pywin32/pywin32/win32/test/test_exceptions.py,v
retrieving revision 1.2.2.5
retrieving revision 1.2.2.6
diff -C2 -d -r1.2.2.5 -r1.2.2.6
*** test_exceptions.py 26 Nov 2008 09:03:30 -0000 1.2.2.5
--- test_exceptions.py 11 Dec 2008 05:45:21 -0000 1.2.2.6
***************
*** 42,51 ****
win32api.CloseHandle(1)
self.fail("expected exception!")
! except win32api.error as xxx_todo_changeme:
! (werror, func, msg) = xxx_todo_changeme.args
! self.failUnlessEqual(werror, winerror.ERROR_INVALID_HANDLE)
! self.failUnlessEqual(func, "CloseHandle")
expected_msg = win32api.FormatMessage(winerror.ERROR_INVALID_HANDLE).rstrip()
! self.failUnlessEqual(msg, expected_msg)
def testAsStr(self):
--- 42,50 ----
win32api.CloseHandle(1)
self.fail("expected exception!")
! except win32api.error as exc:
! self.failUnlessEqual(exc.winerror, winerror.ERROR_INVALID_HANDLE)
! self.failUnlessEqual(exc.funcname, "CloseHandle")
expected_msg = win32api.FormatMessage(winerror.ERROR_INVALID_HANDLE).rstrip()
! self.failUnlessEqual(exc.strerror, expected_msg)
def testAsStr(self):
|