[Python-checkins] python/dist/src/Lib/test test_grammar.py,1.42,1.43

bwarsaw@users.sourceforge.net bwarsaw@users.sourceforge.net
Thu, 29 Aug 2002 06:09:50 -0700


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

Modified Files:
	test_grammar.py 
Log Message:
Fixed three exceptions in the Plain integers test, although I'm not
sure these are the best fixes.

- Test maxint-1 against the negative octal constant -020000000000

- Comment out the tests for oct -1 and hex -1, since 037777777777 and
  0xffffffff raise FutureWarnings now and in Python 2.4 those
  constants will produce positive values, not negative values.  So the
  existing test seems to test something that won't be true in 2.4.


Index: test_grammar.py
===================================================================
RCS file: /cvsroot/python/python/dist/src/Lib/test/test_grammar.py,v
retrieving revision 1.42
retrieving revision 1.43
diff -C2 -d -r1.42 -r1.43
*** test_grammar.py	28 Aug 2002 16:36:10 -0000	1.42
--- test_grammar.py	29 Aug 2002 13:09:47 -0000	1.43
***************
*** 31,38 ****
      maxint = 2147483647
  if maxint == 2147483647:
!     if -2147483647-1 != 020000000000L: raise TestFailed, 'max negative int'
      # XXX -2147483648
!     if 037777777777L != -1: raise TestFailed, 'oct -1'
!     if 0xffffffffL != -1: raise TestFailed, 'hex -1'
      for s in '2147483648', '040000000000', '0x100000000':
          try:
--- 31,38 ----
      maxint = 2147483647
  if maxint == 2147483647:
!     if -2147483647-1 != -020000000000: raise TestFailed, 'max negative int'
      # XXX -2147483648
!     #if 037777777777 != -1: raise TestFailed, 'oct -1'
!     #if 0xffffffff != -1: raise TestFailed, 'hex -1'
      for s in '2147483648', '040000000000', '0x100000000':
          try: