[pywin32-checkins] pywin32/com/win32com/test testShell.py, 1.10, 1.11
OLD project page for the Python extensions for Windows
Brought to you by:
mhammond
From: Mark H. <mha...@us...> - 2008-11-14 00:22:31
|
Update of /cvsroot/pywin32/pywin32/com/win32com/test In directory ddv4jf1.ch3.sourceforge.com:/tmp/cvs-serv24802/com/win32com/test Modified Files: testShell.py Log Message: Various modernizations to .py code via the py3k branch. Index: testShell.py =================================================================== RCS file: /cvsroot/pywin32/pywin32/com/win32com/test/testShell.py,v retrieving revision 1.10 retrieving revision 1.11 diff -C2 -d -r1.10 -r1.11 *** testShell.py 22 Sep 2006 05:05:51 -0000 1.10 --- testShell.py 14 Nov 2008 00:22:25 -0000 1.11 *************** *** 4,7 **** --- 4,12 ---- import copy + try: + sys_maxsize = sys.maxsize # 2.6 and later - maxsize != maxint on 64bits + except AttributeError: + sys_maxsize = sys.maxint + import win32con import pythoncom *************** *** 98,104 **** # The returned objects *always* have dwFlags and cFileName. ! if not fd.has_key('dwFlags'): del fd2['dwFlags'] ! if not fd.has_key('cFileName'): self.assertEqual(fd2['cFileName'], '') del fd2['cFileName'] --- 103,109 ---- # The returned objects *always* have dwFlags and cFileName. ! if 'dwFlags' not in fd: del fd2['dwFlags'] ! if 'cFileName' not in fd: self.assertEqual(fd2['cFileName'], '') del fd2['cFileName'] *************** *** 130,134 **** ftLastAccessTime=pythoncom.MakeTime(11), ftLastWriteTime=pythoncom.MakeTime(12), ! nFileSize=sys.maxint + 1) self._testRT(d) --- 135,139 ---- ftLastAccessTime=pythoncom.MakeTime(11), ftLastWriteTime=pythoncom.MakeTime(12), ! nFileSize=sys_maxsize + 1) self._testRT(d) *************** *** 138,142 **** # no kw-args to dict in 2.2 - not worth converting! return ! d = [dict(cFileName=u"foo.txt", sizel=(1,2), pointl=(3,4), --- 143,147 ---- # no kw-args to dict in 2.2 - not worth converting! return ! d = [dict(cFileName="foo.txt", sizel=(1,2), pointl=(3,4), *************** *** 145,150 **** ftLastAccessTime=pythoncom.MakeTime(11), ftLastWriteTime=pythoncom.MakeTime(12), ! nFileSize=sys.maxint + 1), ! dict(cFileName=u"foo2.txt", sizel=(1,2), pointl=(3,4), --- 150,155 ---- ftLastAccessTime=pythoncom.MakeTime(11), ftLastWriteTime=pythoncom.MakeTime(12), ! nFileSize=sys_maxsize + 1), ! dict(cFileName="foo2.txt", sizel=(1,2), pointl=(3,4), *************** *** 153,157 **** ftLastAccessTime=pythoncom.MakeTime(11), ftLastWriteTime=pythoncom.MakeTime(12), ! nFileSize=sys.maxint + 1), dict(cFileName=u"foo\xa9.txt", sizel=(1,2), --- 158,162 ---- ftLastAccessTime=pythoncom.MakeTime(11), ftLastWriteTime=pythoncom.MakeTime(12), ! nFileSize=sys_maxsize + 1), dict(cFileName=u"foo\xa9.txt", sizel=(1,2), *************** *** 161,165 **** ftLastAccessTime=pythoncom.MakeTime(11), ftLastWriteTime=pythoncom.MakeTime(12), ! nFileSize=sys.maxint + 1), ] s = shell.FILEGROUPDESCRIPTORAsString(d, 1) --- 166,170 ---- ftLastAccessTime=pythoncom.MakeTime(11), ftLastWriteTime=pythoncom.MakeTime(12), ! nFileSize=sys_maxsize + 1), ] s = shell.FILEGROUPDESCRIPTORAsString(d, 1) |