Update of /cvsroot/pywin32/pywin32/com/win32comext/bits/test
In directory ddv4jf1.ch3.sourceforge.com:/tmp/cvs-serv4132/com/win32comext/bits/test
Modified Files:
show_all_jobs.py test_bits.py
Log Message:
move to dictionary iterators where possible
Index: show_all_jobs.py
===================================================================
RCS file: /cvsroot/pywin32/pywin32/com/win32comext/bits/test/show_all_jobs.py,v
retrieving revision 1.2
retrieving revision 1.3
diff -C2 -d -r1.2 -r1.3
*** show_all_jobs.py 12 Feb 2008 00:10:57 -0000 1.2
--- show_all_jobs.py 4 Dec 2008 07:23:46 -0000 1.3
***************
*** 4,12 ****
states = dict([(val, (name[13:]))
! for name, val in vars(bits).items()
if name.startswith('BG_JOB_STATE_')])
job_types = dict([(val, (name[12:]))
! for name, val in vars(bits).items()
if name.startswith('BG_JOB_TYPE_')])
--- 4,12 ----
states = dict([(val, (name[13:]))
! for name, val in vars(bits).iteritems()
if name.startswith('BG_JOB_STATE_')])
job_types = dict([(val, (name[12:]))
! for name, val in vars(bits).iteritems()
if name.startswith('BG_JOB_TYPE_')])
Index: test_bits.py
===================================================================
RCS file: /cvsroot/pywin32/pywin32/com/win32comext/bits/test/test_bits.py,v
retrieving revision 1.2
retrieving revision 1.3
diff -C2 -d -r1.2 -r1.3
*** test_bits.py 12 Feb 2008 00:10:57 -0000 1.2
--- test_bits.py 4 Dec 2008 07:23:46 -0000 1.3
***************
*** 10,14 ****
job_name = 'bits-pywin32-test'
states = dict([(val, (name[13:]))
! for name, val in vars(bits).items()
if name.startswith('BG_JOB_STATE_')])
--- 10,14 ----
job_name = 'bits-pywin32-test'
states = dict([(val, (name[13:]))
! for name, val in vars(bits).iteritems()
if name.startswith('BG_JOB_STATE_')])
|