[pypy-svn] r70249 - in pypy/trunk/pypy/rpython/memory/gctransform: . test

pedronis at codespeak.net pedronis at codespeak.net
Tue Dec 22 14:46:44 CET 2009


Author: pedronis
Date: Tue Dec 22 14:46:44 2009
New Revision: 70249

Modified:
   pypy/trunk/pypy/rpython/memory/gctransform/framework.py
   pypy/trunk/pypy/rpython/memory/gctransform/test/test_framework.py
Log:
give the function name in the exception

Modified: pypy/trunk/pypy/rpython/memory/gctransform/framework.py
==============================================================================
--- pypy/trunk/pypy/rpython/memory/gctransform/framework.py	(original)
+++ pypy/trunk/pypy/rpython/memory/gctransform/framework.py	Tue Dec 22 14:46:44 2009
@@ -570,7 +570,8 @@
         func = getattr(graph, 'func', None)
         if func and getattr(func, '_gc_no_collect_', False):
             if self.collect_analyzer.analyze_direct_call(graph):
-                raise Exception("no_collect function can trigger collection")
+                raise Exception("no_collect function can trigger collection: %s"
+                                % func.__name__)
             
         if self.write_barrier_ptr:
             self.clean_sets = (

Modified: pypy/trunk/pypy/rpython/memory/gctransform/test/test_framework.py
==============================================================================
--- pypy/trunk/pypy/rpython/memory/gctransform/test/test_framework.py	(original)
+++ pypy/trunk/pypy/rpython/memory/gctransform/test/test_framework.py	Tue Dec 22 14:46:44 2009
@@ -156,7 +156,7 @@
     cbuild = CStandaloneBuilder(t, entrypoint, t.config,
                                 gcpolicy=FrameworkGcPolicy2)
     f = py.test.raises(Exception, cbuild.generate_graphs_for_llinterp)
-    assert str(f.value) == 'no_collect function can trigger collection'
+    assert str(f.value) == 'no_collect function can trigger collection: g'
 
 class WriteBarrierTransformer(FrameworkGCTransformer):
     clean_sets = {}



More information about the Pypy-commit mailing list