diff genshi/template/tests/eval.py @ 568:461d9d0e85a4 trunk

AST transformer needs to also handle the class body.
author cmlenz
date Sat, 14 Jul 2007 08:56:20 +0000
parents 4ed941aa0cbf
children c17342ef9efb
line wrap: on
line diff
--- a/genshi/template/tests/eval.py
+++ b/genshi/template/tests/eval.py
@@ -457,6 +457,15 @@
         suite.execute(data)
         assert 'plain' in data
 
+    def test_class_with_methods(self):
+        suite = Suite("""class plain(object):
+    def donothing():
+        pass
+""")
+        data = {}
+        suite.execute(data)
+        assert 'plain' in data
+
     def test_import(self):
         suite = Suite("from itertools import ifilter")
         data = {}
Copyright (C) 2012-2017 Edgewall Software