[Python-checkins] python/dist/src/Lib/test test_parser.py, 1.20,
1.21 test_compiler.py, 1.10, 1.11
bcannon at users.sourceforge.net
bcannon at users.sourceforge.net
Sat Apr 9 04:30:18 CEST 2005
Update of /cvsroot/python/python/dist/src/Lib/test
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv10651/Lib/test
Modified Files:
test_parser.py test_compiler.py
Log Message:
Flush out support for ``class B(): pass`` syntax by adding support to the
'parser' module and 'compiler' package.
Closes patch #1176012. Thanks logistix.
Index: test_parser.py
===================================================================
RCS file: /cvsroot/python/python/dist/src/Lib/test/test_parser.py,v
retrieving revision 1.20
retrieving revision 1.21
diff -u -d -r1.20 -r1.21
--- test_parser.py 31 Aug 2004 10:07:09 -0000 1.20
+++ test_parser.py 9 Apr 2005 02:30:15 -0000 1.21
@@ -127,6 +127,9 @@
self.check_suite("@funcattrs()\n"
"def f(): pass")
+ def test_class_defs(self):
+ self.check_suite("class foo():pass")
+
def test_import_from_statement(self):
self.check_suite("from sys.path import *")
self.check_suite("from sys.path import dirname")
Index: test_compiler.py
===================================================================
RCS file: /cvsroot/python/python/dist/src/Lib/test/test_compiler.py,v
retrieving revision 1.10
retrieving revision 1.11
diff -u -d -r1.10 -r1.11
--- test_compiler.py 8 Nov 2004 16:46:02 -0000 1.10
+++ test_compiler.py 9 Apr 2005 02:30:15 -0000 1.11
@@ -33,6 +33,9 @@
else:
compiler.compile(buf, basename, "exec")
+ def testNewClassSyntax(self):
+ compiler.compile("class foo():pass\n\n","<string>","exec")
+
def testLineNo(self):
# Test that all nodes except Module have a correct lineno attribute.
filename = __file__
More information about the Python-checkins
mailing list