[Python-checkins] CVS: python/dist/src/Lib/test test_descr.py,1.1.2.32,1.1.2.33

Tim Peters tim_one@users.sourceforge.net
Tue, 10 Jul 2001 15:10:32 -0700


Update of /cvsroot/python/python/dist/src/Lib/test
In directory usw-pr-cvs1:/tmp/cvs-serv4533/descr/dist/src/Lib/test

Modified Files:
      Tag: descr-branch
	test_descr.py 
Log Message:
Hack repair:  During the merge from the trunk, I hacked around bad
test_descr assumptions about exact dict traversal order by replacing
them with qually bad (but correct <wink>) assumptions about the same
thing.  These changes remove the assumptions about dict traversal order.


Index: test_descr.py
===================================================================
RCS file: /cvsroot/python/python/dist/src/Lib/test/Attic/test_descr.py,v
retrieving revision 1.1.2.32
retrieving revision 1.1.2.33
diff -C2 -r1.1.2.32 -r1.1.2.33
*** test_descr.py	2001/07/09 01:26:19	1.1.2.32
--- test_descr.py	2001/07/10 22:10:30	1.1.2.33
***************
*** 119,124 ****
      for i in dictionary.__iter__(d): l.append(i)
      verify(l == l1)
!     testunop({1:2,3:4}, 2, "len(a)", "__len__")
!     testunop({1:2,3:4}, "{1: 2, 3: 4}", "repr(a)", "__repr__")
      testset2op({1:2,3:4}, 2, 3, {1:2,2:3,3:4}, "a[b]=c", "__setitem__")
  
--- 119,126 ----
      for i in dictionary.__iter__(d): l.append(i)
      verify(l == l1)
!     d = {1:2, 3:4}
!     testunop(d, 2, "len(a)", "__len__")
!     verify(eval(repr(d), {}) == d)
!     verify(eval(d.__repr__(), {}) == d)
      testset2op({1:2,3:4}, 2, 3, {1:2,2:3,3:4}, "a[b]=c", "__setitem__")
  
***************
*** 280,285 ****
      for i in type(spamdict({})).__iter__(d): l.append(i)
      verify(l == l1)
!     testunop(spamdict({1:2,3:4}), 2, "len(a)", "__len__")
!     testunop(spamdict({1:2,3:4}), "{1: 2, 3: 4}", "repr(a)", "__repr__")
      testset2op(spamdict({1:2,3:4}), 2, 3, spamdict({1:2,2:3,3:4}),
                 "a[b]=c", "__setitem__")
--- 282,289 ----
      for i in type(spamdict({})).__iter__(d): l.append(i)
      verify(l == l1)
!     straightd = {1:2, 3:4}
!     spamd = spamdict(straightd)
!     testunop(spamd, 2, "len(a)", "__len__")
!     testunop(spamd, repr(straightd), "repr(a)", "__repr__")
      testset2op(spamdict({1:2,3:4}), 2, 3, spamdict({1:2,2:3,3:4}),
                 "a[b]=c", "__setitem__")