diff options
author | Guido van Rossum <guido@python.org> | 2002-08-29 14:57:26 (GMT) |
---|---|---|
committer | Guido van Rossum <guido@python.org> | 2002-08-29 14:57:26 (GMT) |
commit | f0253f2bc585ed5d6e446d78b3538550ec00af24 (patch) | |
tree | e7162572fbfb1ece7e8fd632ee2e7b000bc15795 /Lib/test | |
parent | 604cd6ae79e0e7ff52b96bba9aa9fbd6c21e1e8f (diff) | |
download | cpython-f0253f2bc585ed5d6e446d78b3538550ec00af24.zip cpython-f0253f2bc585ed5d6e446d78b3538550ec00af24.tar.gz cpython-f0253f2bc585ed5d6e446d78b3538550ec00af24.tar.bz2 |
Restore the hex/oct constant tests that Barry commented out for fear
of FutureWarnings. Added a comment explaining the situation.
Diffstat (limited to 'Lib/test')
-rw-r--r-- | Lib/test/test_grammar.py | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/Lib/test/test_grammar.py b/Lib/test/test_grammar.py index 3f289d8..e0667d8 100644 --- a/Lib/test/test_grammar.py +++ b/Lib/test/test_grammar.py @@ -1,6 +1,13 @@ # Python test set -- part 1, grammar. # This just tests whether the parser accepts them all. +# NOTE: When you run this test as a script from the command line, you +# get warnings about certain hex/oct constants. Since those are +# issued by the parser, you can't suppress them by adding a +# filterwarnings() call to this module. Therefore, to shut up the +# regression test, the filterwarnings() call has been added to +# regrtest.py. + from test.test_support import TestFailed, verify, check_syntax import sys @@ -32,8 +39,8 @@ except ImportError: 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' + if 037777777777 != -1: raise TestFailed, 'oct -1' + if 0xffffffff != -1: raise TestFailed, 'hex -1' for s in '2147483648', '040000000000', '0x100000000': try: x = eval(s) |