Update of /cvsroot/pywin32/pywin32/win32/test
In directory ddv4jf1.ch3.sourceforge.com:/tmp/cvs-serv10471/win32/test
Modified Files:
test_win32api.py test_win32file.py
Log Message:
Move to exception attributes.
Index: test_win32file.py
===================================================================
RCS file: /cvsroot/pywin32/pywin32/win32/test/test_win32file.py,v
retrieving revision 1.13
retrieving revision 1.14
diff -C2 -d -r1.13 -r1.14
*** test_win32file.py 28 May 2008 04:32:22 -0000 1.13
--- test_win32file.py 3 Oct 2008 01:03:56 -0000 1.14
***************
*** 176,181 ****
win32file.CloseHandle(hv)
raise RuntimeError, "Expected close to fail!"
! except win32file.error, (hr, func, msg):
! self.failUnlessEqual(hr, winerror.ERROR_INVALID_HANDLE)
def testCompletionPortsQueued(self):
--- 176,181 ----
win32file.CloseHandle(hv)
raise RuntimeError, "Expected close to fail!"
! except win32file.error, details:
! self.failUnlessEqual(details.winerror, winerror.ERROR_INVALID_HANDLE)
def testCompletionPortsQueued(self):
***************
*** 489,493 ****
win32file.EncryptFile(fname)
except win32file.error, details:
! if details[0] != winerror.ERROR_ACCESS_DENIED:
raise
print "It appears this is not NTFS - cant encrypt/decrypt"
--- 489,493 ----
win32file.EncryptFile(fname)
except win32file.error, details:
! if details.winerror != winerror.ERROR_ACCESS_DENIED:
raise
print "It appears this is not NTFS - cant encrypt/decrypt"
Index: test_win32api.py
===================================================================
RCS file: /cvsroot/pywin32/pywin32/win32/test/test_win32api.py,v
retrieving revision 1.13
retrieving revision 1.14
diff -C2 -d -r1.13 -r1.14
*** test_win32api.py 4 Jan 2008 04:53:29 -0000 1.13
--- test_win32api.py 3 Oct 2008 01:03:56 -0000 1.14
***************
*** 145,149 ****
win32file.CreateDirectoryW(fname, None)
except win32api.error, details:
! if details[0]!=winerror.ERROR_ALREADY_EXISTS:
raise
try:
--- 145,149 ----
win32file.CreateDirectoryW(fname, None)
except win32api.error, details:
! if details.winerror!=winerror.ERROR_ALREADY_EXISTS:
raise
try:
***************
*** 153,157 ****
attr = win32api.GetFileAttributes(fname)
except win32api.error, details:
! if details[0] != winerror.ERROR_FILENAME_EXCED_RANGE:
raise
--- 153,157 ----
attr = win32api.GetFileAttributes(fname)
except win32api.error, details:
! if details.winerror != winerror.ERROR_FILENAME_EXCED_RANGE:
raise
|