[pypy-commit] pypy default: turn these long-running tests into generative tests; 1. this way it's easier to run just one specific test in case of failure; 2. it's nicer to see many dots than wait a long time for just one :-)

antocuni noreply at buildbot.pypy.org
Tue Jun 7 17:04:48 CEST 2011


Author: Antonio Cuni <anto.cuni at gmail.com>
Branch: 
Changeset: r44797:c15c9afc1d87
Date: 2011-06-07 16:14 +0200
http://bitbucket.org/pypy/pypy/changeset/c15c9afc1d87/

Log:	turn these long-running tests into generative tests; 1. this way
	it's easier to run just one specific test in case of failure; 2.
	it's nicer to see many dots than wait a long time for just one :-)

diff --git a/pypy/module/pypyjit/test_pypy_c/test_intbound.py b/pypy/module/pypyjit/test_pypy_c/test_intbound.py
--- a/pypy/module/pypyjit/test_pypy_c/test_intbound.py
+++ b/pypy/module/pypyjit/test_pypy_c/test_intbound.py
@@ -37,7 +37,7 @@
                             return res
 
                         ''' % (o1, n1, o2, n2)
-                        self.run_and_check(src)
+                        yield self.run_and_check, src
 
     def test_intbound_addsub_mix(self):
         """
@@ -72,7 +72,7 @@
                     return res
 
                 ''' % (t1, t2)
-                self.run_and_check(src)
+                yield self.run_and_check, src
 
     def test_intbound_gt(self):
         def main(n):
diff --git a/pypy/module/pypyjit/test_pypy_c/test_pypy_c_new.py b/pypy/module/pypyjit/test_pypy_c/test_pypy_c_new.py
--- a/pypy/module/pypyjit/test_pypy_c/test_pypy_c_new.py
+++ b/pypy/module/pypyjit/test_pypy_c/test_pypy_c_new.py
@@ -866,7 +866,7 @@
                                     sa += 20000
                             return sa
                     """ % (op1, a, op2, b)
-                    self.run_and_check(src)
+                    yield self.run_and_check, src
 
                     src = """
                         def main():
@@ -884,7 +884,7 @@
                                 i += 0.25
                             return sa
                     """ % (op1, float(a)/4.0, op2, float(b)/4.0)
-                    self.run_and_check(src, threshold=300)
+                    yield self.run_and_check, src
 
 
     def test_boolrewrite_allcases_reflex(self):
@@ -916,7 +916,7 @@
                                     sa += 20000
                             return sa
                     """ % (op1, a, b, op2)
-                    self.run_and_check(src)
+                    yield self.run_and_check, src
 
                     src = """
                         def main():
@@ -934,7 +934,7 @@
                                 i += 0.25
                             return sa
                     """ % (op1, float(a)/4.0, float(b)/4.0, op2)
-                    self.run_and_check(src, threshold=300)
+                    yield self.run_and_check, src
 
     def test_boolrewrite_ptr(self):
         """
@@ -965,7 +965,7 @@
                                 a = b
                         return sa
                 """ % (e1, e2)
-                self.run_and_check(src)
+                yield self.run_and_check, src
 
     def test_array_sum(self):
         def main():
@@ -1582,7 +1582,7 @@
         maxvals = (-maxint-1, -maxint, maxint-1, maxint)
         for a in (-4, -3, -2, -1, 0, 1, 2, 3, 4) + maxvals:
             for b in (0, 1, 2, 31, 32, 33, 61, 62, 63):
-                self.run_and_check(main, [a, b])
+                yield self.run_and_check, main, [a, b]
 
     def test_revert_shift_allcases(self):
         """
@@ -1610,7 +1610,7 @@
         for a in (1, 4, 8, 100):
             for b in (-10, 10, -201, 201, -maxint/3, maxint/3):
                 for c in (-10, 10, -maxint/3, maxint/3):
-                    self.run_and_check(main, [a, b, c])
+                    yield self.run_and_check, main, [a, b, c]
 
     def test_oldstyle_newstyle_mix(self):
         def main():


More information about the pypy-commit mailing list