[pypy-svn] r12236 - in pypy/dist/pypy/annotation: . test

pedronis at codespeak.net pedronis at codespeak.net
Fri May 13 15:50:27 CEST 2005


Author: pedronis
Date: Fri May 13 15:50:27 2005
New Revision: 12236

Modified:
   pypy/dist/pypy/annotation/model.py
   pypy/dist/pypy/annotation/test/test_model.py
Log:
fix test gone out of sync wrt code



Modified: pypy/dist/pypy/annotation/model.py
==============================================================================
--- pypy/dist/pypy/annotation/model.py	(original)
+++ pypy/dist/pypy/annotation/model.py	Fri May 13 15:50:27 2005
@@ -300,7 +300,7 @@
 
 def ll_to_annotation(v):
        if v is None:
-            assert False, "cannot retrieve Void low-level type value"
+            raise ValueError, "cannot retrieve Void low-level type value"
        typ = lltypes.typeOf(v)
        s = ll_to_annotation_map.get(typ)
        if s is None:

Modified: pypy/dist/pypy/annotation/test/test_model.py
==============================================================================
--- pypy/dist/pypy/annotation/test/test_model.py	(original)
+++ pypy/dist/pypy/annotation/test/test_model.py	Fri May 13 15:50:27 2005
@@ -139,7 +139,7 @@
     PS = lltypes.GcPtr(lltypes.Struct('s'))
     s_p = SomePtr(ll_ptrtype=PS)
     assert annotation_to_lltype(s_p) == PS
-    py.test.raises(AssertionError, "annotation_to_lltype(si0)")
+    py.test.raises(ValueError, "annotation_to_lltype(si0)")
     
 def test_ll_union():
     PS1 = lltypes.GcPtr(lltypes.Struct('s'))



More information about the Pypy-commit mailing list