Update of /cvsroot/pywin32/pywin32/win32/test
In directory ddv4jf1.ch3.sourceforge.com:/tmp/cvs-serv1813/win32/test
Modified Files:
Tag: py3k
test_win32file.py testall.py
Log Message:
merge various changes from the trunk
Index: test_win32file.py
===================================================================
RCS file: /cvsroot/pywin32/pywin32/win32/test/test_win32file.py,v
retrieving revision 1.13.2.3
retrieving revision 1.13.2.4
diff -C2 -d -r1.13.2.3 -r1.13.2.4
*** test_win32file.py 23 Oct 2008 09:45:16 -0000 1.13.2.3
--- test_win32file.py 11 Dec 2008 07:06:51 -0000 1.13.2.4
***************
*** 65,71 ****
# GetFileAttributesEx/GetFileAttributesExW tests.
- print (win32file.GetFileAttributesEx(testName), win32file.GetFileAttributesExW(testName))
self.failUnlessEqual(win32file.GetFileAttributesEx(testName), win32file.GetFileAttributesExW(testName))
- ## "ERROR: Expected GetFileAttributesEx and GetFileAttributesExW to return the same data")
attr, ct, at, wt, size = win32file.GetFileAttributesEx(testName)
--- 65,69 ----
***************
*** 232,235 ****
--- 230,235 ----
t = threading.Thread(target=self._IOCPServerThread, args=(handle,port, test_overlapped_death))
+ # hrmph - markh is seeing failures here on x64 - and a hang!
+ t.setDaemon(True) # avoid hanging entire test suite on failure.
t.start()
try:
***************
*** 243,247 ****
finally:
handle.Close()
! t.join()
def testCompletionPortsNonQueuedBadReference(self):
--- 243,248 ----
finally:
handle.Close()
! t.join(3)
! self.failIf(t.isAlive(), "thread didn't finish")
def testCompletionPortsNonQueuedBadReference(self):
***************
*** 293,299 ****
t.start()
running.wait(2)
! if not running.is_set():
self.fail("AcceptEx Worker thread failed to start")
! s = socket.create_connection(('127.0.0.1', port), 10)
win32file.WSASend(s, b"hello", None)
overlapped = pywintypes.OVERLAPPED()
--- 294,301 ----
t.start()
running.wait(2)
! if not running.isSet():
self.fail("AcceptEx Worker thread failed to start")
! s = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
! s.connect(('127.0.0.1', port))
win32file.WSASend(s, b"hello", None)
overlapped = pywintypes.OVERLAPPED()
***************
*** 396,407 ****
while 1:
try:
! print ("waiting", dh)
changes = win32file.ReadDirectoryChangesW(dh,
8192,
False, #sub-tree
flags)
! print ("got", changes)
except:
! traceback.print_exc()
changes.extend(changes)
--- 398,409 ----
while 1:
try:
! print("waiting", dh)
changes = win32file.ReadDirectoryChangesW(dh,
8192,
False, #sub-tree
flags)
! print("got", changes)
except:
! raise
changes.extend(changes)
***************
*** 434,438 ****
return
else:
! print ("ERROR: Watcher thread timed-out!")
return # kill the thread!
--- 436,440 ----
return
else:
! print("ERROR: Watcher thread timed-out!")
return # kill the thread!
***************
*** 448,458 ****
shutil.rmtree(dn)
except OSError:
! print ("FAILED to remove directory", dn)
for t in self.watcher_threads:
# closing dir handle should have killed threads!
t.join(5)
! if t.is_alive():
! print ("FAILED to wait for thread termination")
def stablize(self):
--- 450,460 ----
shutil.rmtree(dn)
except OSError:
! print("FAILED to remove directory", dn)
for t in self.watcher_threads:
# closing dir handle should have killed threads!
t.join(5)
! if t.isAlive():
! print("FAILED to wait for thread termination")
def stablize(self):
***************
*** 492,496 ****
if details.winerror != winerror.ERROR_ACCESS_DENIED:
raise
! print ("It appears this is not NTFS - cant encrypt/decrypt")
win32file.DecryptFile(fname)
finally:
--- 494,498 ----
if details.winerror != winerror.ERROR_ACCESS_DENIED:
raise
! print("It appears this is not NTFS - cant encrypt/decrypt")
win32file.DecryptFile(fname)
finally:
Index: testall.py
===================================================================
RCS file: /cvsroot/pywin32/pywin32/win32/test/testall.py,v
retrieving revision 1.6.2.4
retrieving revision 1.6.2.5
diff -C2 -d -r1.6.2.4 -r1.6.2.5
*** testall.py 11 Dec 2008 04:24:25 -0000 1.6.2.4
--- testall.py 11 Dec 2008 07:06:51 -0000 1.6.2.5
***************
*** 31,37 ****
stdout=subprocess.PIPE,
stderr=subprocess.STDOUT)
! p.wait()
rc = p.returncode
- output = p.stdout.read()
except ImportError:
# py2.3?
--- 31,36 ----
stdout=subprocess.PIPE,
stderr=subprocess.STDOUT)
! output, _ = p.communicate()
rc = p.returncode
except ImportError:
# py2.3?
|