diff genshi/template/tests/eval.py @ 703:af57b12e3dd2 experimental-match-fastpaths

merge in trunk up through r818 - fundamentally changed the way MatchSet works, but actually is more consistent now
author aflett
date Mon, 31 Mar 2008 22:47:50 +0000
parents 0653f6c1ffdf
children b5bd8c109209
line wrap: on
line diff
--- a/genshi/template/tests/eval.py
+++ b/genshi/template/tests/eval.py
@@ -342,11 +342,16 @@
 
     def test_getattr_exception(self):
         class Something(object):
-            def prop(self):
+            def prop_a(self):
                 raise NotImplementedError
-            prop = property(prop)
+            prop_a = property(prop_a)
+            def prop_b(self):
+                raise AttributeError
+            prop_b = property(prop_b)
         self.assertRaises(NotImplementedError,
-                          Expression('s.prop').evaluate, {'s': Something()})
+                          Expression('s.prop_a').evaluate, {'s': Something()})
+        self.assertRaises(AttributeError,
+                          Expression('s.prop_b').evaluate, {'s': Something()})
 
     def test_getitem_undefined_string(self):
         class Something(object):
Copyright (C) 2012-2017 Edgewall Software