[pypy-commit] pypy default: A failing test. It causes very occasional failures like this one:

arigo noreply at buildbot.pypy.org
Tue Jun 7 16:53:23 CEST 2011


Author: Armin Rigo <arigo at tunes.org>
Branch: 
Changeset: r44794:a571136cc78e
Date: 2011-06-07 16:54 +0200
http://bitbucket.org/pypy/pypy/changeset/a571136cc78e/

Log:	A failing test. It causes very occasional failures like this one: h
	ttp://buildbot.pypy.org/summary/longrepr?testname=modified&builder=p
	ypy-c-app-level-linux-x86-64&build=443&mod=lib-
	python.modified-2.7.test.test_array

diff --git a/pypy/annotation/test/test_annrpython.py b/pypy/annotation/test/test_annrpython.py
--- a/pypy/annotation/test/test_annrpython.py
+++ b/pypy/annotation/test/test_annrpython.py
@@ -3483,6 +3483,17 @@
         a = self.RPythonAnnotator()
         raises(Exception, a.build_types, f, [int])
 
+    def test_range_variable_step(self):
+        def g(n):
+            return range(0, 10, n)
+        def f(n):
+            r = g(1)    # constant step, at first
+            s = g(n)    # but it becomes a variable step
+            return r
+        a = self.RPythonAnnotator()
+        s = a.build_types(f, [int])
+        assert s.listdef.listitem.range_step == 0
+
 
 def g(n):
     return [0,1,2,n]


More information about the pypy-commit mailing list