[pypy-svn] r15834 - pypy/dist/pypy/translator/test

arigo at codespeak.net arigo at codespeak.net
Tue Aug 9 17:19:01 CEST 2005


Author: arigo
Date: Tue Aug  9 17:18:58 2005
New Revision: 15834

Modified:
   pypy/dist/pypy/translator/test/test_annrpython.py
Log:
Fixed tests to expect the more precise 'can_only_throw' tags on getitem.


Modified: pypy/dist/pypy/translator/test/test_annrpython.py
==============================================================================
--- pypy/dist/pypy/translator/test/test_annrpython.py	(original)
+++ pypy/dist/pypy/translator/test/test_annrpython.py	Tue Aug  9 17:18:58 2005
@@ -671,7 +671,7 @@
 
         a = self.RPythonAnnotator()
         s = a.build_types(f, [list])
-        assert s.knowntype is LookupError
+        assert s.knowntype is IndexError  # KeyError ignored because l is a list
 
     def test_overrides(self):
         import sys
@@ -1100,8 +1100,9 @@
         t = annmodel.SomeObject()
         t.knowntype = type
         t.is_type_of = [ev]
+        t.const = KeyError    # IndexError ignored because 'dic' is a dict
         assert a.binding(et) == t
-        assert isinstance(a.binding(ev), annmodel.SomeInstance) and a.binding(ev).classdef.cls == LookupError
+        assert isinstance(a.binding(ev), annmodel.SomeInstance) and a.binding(ev).classdef.cls == KeyError
 
     def test_exception_mixing(self):
         def h():



More information about the Pypy-commit mailing list