[Python-checkins] python/dist/src/Lib/test test_sets.py,1.5,1.6

rhettinger@users.sourceforge.net rhettinger@users.sourceforge.net
Sat, 24 Aug 2002 00:33:08 -0700


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

Modified Files:
	test_sets.py 
Log Message:
Removed < <= > >= from the API.  Implemented as comparisons of the 
underlying dictionaries, there were no reasonable use cases (lexicographic
sorting of a list of sets is somewhat esoteric).  Frees the operators
for other uses (such as strict subset and superset comparisons).

Updated documentation and test suite accordingly.



Index: test_sets.py
===================================================================
RCS file: /cvsroot/python/python/dist/src/Lib/test/test_sets.py,v
retrieving revision 1.5
retrieving revision 1.6
diff -C2 -d -r1.5 -r1.6
*** test_sets.py	24 Aug 2002 06:19:02 -0000	1.5
--- test_sets.py	24 Aug 2002 07:33:06 -0000	1.6
***************
*** 420,429 ****
      def test_cmp(self):
          try:
!             self.other < self.set
              assert 0, "Comparison with non-set on left"
          except TypeError:
              pass
          try:
!             self.set >= self.other
              assert 0, "Comparison with non-set on right"
          except TypeError:
--- 420,429 ----
      def test_cmp(self):
          try:
!             self.other == self.set
              assert 0, "Comparison with non-set on left"
          except TypeError:
              pass
          try:
!             self.set != self.other
              assert 0, "Comparison with non-set on right"
          except TypeError: