Source

show / test / test_show.py

Diff from to

File test/test_show.py

     class OO(object):
         def __init__(self, name, age, address):
             self.name = name
+            self._name = name.upper()
             self.age  = age
             self.address = address
         def test(self):
     
     oo = OO('Joe', 36, 'Waverly Place')
 
-    assert show.props(oo) == "oo: address='Waverly Place' age=36 name='Joe'"
+    assert show.props(oo) == "oo: address='Waverly Place' age=36 name='Joe' _name='JOE'"
+    
+def test_show_real_properties():
+        
+    class P(object):
+        def __init__(self, name):
+            self._name = name.upper()
+            self.name = name
+        @property
+        def namer(self):
+            return self._name.lower()
+        def named(self):
+            return self.name
+    
+    p = P('Joe')
+    assert show.props(p) == "p: name='Joe' namer='joe' _name='JOE'"