[Python-checkins] python/dist/src/Lib/test test_sets.py,1.21,1.22

tim_one@users.sourceforge.net tim_one@users.sourceforge.net
Sat, 01 Mar 2003 16:31:26 -0800


Update of /cvsroot/python/python/dist/src/Lib/test
In directory sc8-pr-cvs1:/tmp/cvs-serv28203/Lib/test

Modified Files:
	test_sets.py 
Log Message:
Typo repairs in new code.


Index: test_sets.py
===================================================================
RCS file: /cvsroot/python/python/dist/src/Lib/test/test_sets.py,v
retrieving revision 1.21
retrieving revision 1.22
diff -C2 -d -r1.21 -r1.22
*** test_sets.py	2 Mar 2003 00:19:49 -0000	1.21
--- test_sets.py	2 Mar 2003 00:31:23 -0000	1.22
***************
*** 236,240 ****
  
          # You can view this as a buglet:  cmp(a, a) does not raise TypeError,
!         # because __eq__ is tried before __cmp__, and a.__eq__(a) returns,
          # which Python thinks is good enough to synthesize a cmp() result
          # without calling __cmp__.
--- 236,240 ----
  
          # You can view this as a buglet:  cmp(a, a) does not raise TypeError,
!         # because __eq__ is tried before __cmp__, and a.__eq__(a) returns True,
          # which Python thinks is good enough to synthesize a cmp() result
          # without calling __cmp__.
***************
*** 493,502 ****
          self.assertEqual(self.set != self.other, True)
  
!     def test_ge_gt_lt_le(self):
!         # Unlike the others, this is testing that == and != *are* allowed.
          self.assertRaises(TypeError, lambda: self.set < self.other)
          self.assertRaises(TypeError, lambda: self.set <= self.other)
          self.assertRaises(TypeError, lambda: self.set > self.other)
          self.assertRaises(TypeError, lambda: self.set >= self.other)
  
      def test_union_update(self):
--- 493,506 ----
          self.assertEqual(self.set != self.other, True)
  
!     def test_ge_gt_le_lt(self):
          self.assertRaises(TypeError, lambda: self.set < self.other)
          self.assertRaises(TypeError, lambda: self.set <= self.other)
          self.assertRaises(TypeError, lambda: self.set > self.other)
          self.assertRaises(TypeError, lambda: self.set >= self.other)
+ 
+         self.assertRaises(TypeError, lambda: self.other < self.set)
+         self.assertRaises(TypeError, lambda: self.other <= self.set)
+         self.assertRaises(TypeError, lambda: self.other > self.set)
+         self.assertRaises(TypeError, lambda: self.other >= self.set)
  
      def test_union_update(self):