[pypy-svn] r36490 - pypy/dist/pypy/annotation/test

fijal at codespeak.net fijal at codespeak.net
Thu Jan 11 15:55:36 CET 2007


Author: fijal
Date: Thu Jan 11 15:55:34 2007
New Revision: 36490

Modified:
   pypy/dist/pypy/annotation/test/test_annrpython.py
Log:
(arigo, fijal) - Fix the unimplemented test, so it now resembles more what
we want to achieve.


Modified: pypy/dist/pypy/annotation/test/test_annrpython.py
==============================================================================
--- pypy/dist/pypy/annotation/test/test_annrpython.py	(original)
+++ pypy/dist/pypy/annotation/test/test_annrpython.py	Thu Jan 11 15:55:34 2007
@@ -2452,24 +2452,26 @@
 
     def test_some_generic_function_call(self):
         py.test.skip("Not implemented")
-        def g(a, b, c):
+        def g(a):
             pass
-        g.known_signature = FunctionSignature(args=(3, 3, 3), retval=3)
+        g._known_signature_ = annmodel.SomeGenericFunction(
+            args=(annmodel.SomeInteger(),), retval=annmodel.SomeInteger())
 
         def fun():
-            return g(1, 2, 3)
+            return g(1)
         a = self.RPythonAnnotator(policy=policy.AnnotatorPolicy())
         s = a.build_types(fun, [])
         assert isinstance(s.returntype, annmodel.SomeInteger)
         assert not hasattr(s.returntype, 'const')
         # assert that a know the g
 
-    def test_some_genereic_function_callback(self):
+    def test_some_generic_function_callback(self):
         py.test.skip("Not implemented")
         def g(a):
             pass
-        g.known_signature = FunctionSignature(args=
-            [FunctionSignature(args=[1])], retval=3)
+        g._known_signature_ = annmodel.SomeGenericFunction(
+            args=[annmodel.SomeGenericFunction(args=[SomeInteger()],
+                                               retval=SomeInteger())])
 
         def fun2(x):
             return x



More information about the Pypy-commit mailing list