[Python-checkins] python/dist/src/Lib/test test_parser.py,1.14,1.15
nnorwitz@users.sourceforge.net
nnorwitz@users.sourceforge.net
Sun, 09 Feb 2003 17:54:08 -0800
Update of /cvsroot/python/python/dist/src/Lib/test
In directory sc8-pr-cvs1:/tmp/cvs-serv8407/Lib/test
Modified Files:
test_parser.py
Log Message:
Add tests and news entry about parser errors from bug #678518.
Index: test_parser.py
===================================================================
RCS file: /cvsroot/python/python/dist/src/Lib/test/test_parser.py,v
retrieving revision 1.14
retrieving revision 1.15
diff -C2 -d -r1.14 -r1.15
*** test_parser.py 29 Jan 2003 14:20:23 -0000 1.14
--- test_parser.py 10 Feb 2003 01:54:06 -0000 1.15
***************
*** 135,138 ****
--- 135,145 ----
self.check_suite("import sys, math as my_math")
+ def test_pep263(self):
+ self.check_suite("# -*- coding: iso-8859-1 -*-\n"
+ "pass\n")
+
+ def test_assert(self):
+ self.check_suite("assert alo < ahi and blo < bhi\n")
+
#
# Second, we take *invalid* trees and make sure we get ParserError
***************
*** 356,359 ****
--- 363,376 ----
self.check_bad_tree(tree, "a $= b")
+ def test_malformed_global(self):
+ #doesn't have global keyword in ast
+ tree = (257,
+ (264,
+ (265,
+ (266,
+ (282, (1, 'foo'))), (4, ''))),
+ (4, ''),
+ (0, ''))
+ self.check_bad_tree(tree, "malformed global ast")
def test_main():