Author: Alex Gaynor <[email protected]>
Branch: 
Changeset: r63199:4c7feafa28c3
Date: 2013-04-10 07:50 -0700
http://bitbucket.org/pypy/pypy/changeset/4c7feafa28c3/

Log:    a JIT test for codecs lookup

diff --git a/pypy/module/pypyjit/test_pypy_c/test_string.py 
b/pypy/module/pypyjit/test_pypy_c/test_string.py
--- a/pypy/module/pypyjit/test_pypy_c/test_string.py
+++ b/pypy/module/pypyjit/test_pypy_c/test_string.py
@@ -237,3 +237,15 @@
         loops = log.loops_by_filename(self.filepath)
         loop, = loops
         loop.match_by_id('callone', '')    # nothing
+
+    def test_lookup_codec(self):
+        log = self.run("""
+        import codecs
+
+        def main(n):
+            for i in xrange(n):
+                codecs.lookup('utf8')  # ID: codecs
+            return i
+        """, [1000])
+        loop, = log.loops_by_filename(self.filepath)
+        loop.match_by_id('codecs', '')
_______________________________________________
pypy-commit mailing list
[email protected]
http://mail.python.org/mailman/listinfo/pypy-commit

Reply via email to