[pypy-svn] r32796 - in pypy/branch/even-more-config/pypy/config: . test

cfbolz at codespeak.net cfbolz at codespeak.net
Sun Oct 1 20:32:00 CEST 2006


Author: cfbolz
Date: Sun Oct  1 20:31:58 2006
New Revision: 32796

Modified:
   pypy/branch/even-more-config/pypy/config/config.py
   pypy/branch/even-more-config/pypy/config/test/test_config.py
Log:
fix str


Modified: pypy/branch/even-more-config/pypy/config/config.py
==============================================================================
--- pypy/branch/even-more-config/pypy/config/config.py	(original)
+++ pypy/branch/even-more-config/pypy/config/config.py	Sun Oct  1 20:31:58 2006
@@ -89,7 +89,7 @@
                 yield child._name, getattr(self, child._name)
 
     def __str__(self):
-        result = "[%s]\n" % (self._descr._name, )
+        result = "[%s]\n" % (self._cfgimpl_descr._name, )
         for child in self._cfgimpl_descr._children:
             if isinstance(child, Option):
                 if self._cfgimpl_value_owners[child._name] == 'default':

Modified: pypy/branch/even-more-config/pypy/config/test/test_config.py
==============================================================================
--- pypy/branch/even-more-config/pypy/config/test/test_config.py	(original)
+++ pypy/branch/even-more-config/pypy/config/test/test_config.py	Sun Oct  1 20:31:58 2006
@@ -282,3 +282,8 @@
     config.b1 = True
     assert not config.b2
     print config._cfgimpl_value_owners
+
+def test_str():
+    descr = make_description()
+    c = Config(descr)
+    print c # does not crash



More information about the Pypy-commit mailing list