Author: Armin Rigo <[email protected]>
Branch: stm-thread
Changeset: r55052:f45d2b82395b
Date: 2012-05-12 09:17 +0200
http://bitbucket.org/pypy/pypy/changeset/f45d2b82395b/
Log: Remove the numerous prints, not captured when we run the file
directly.
diff --git a/lib_pypy/pypy_test/test_transaction.py
b/lib_pypy/pypy_test/test_transaction.py
--- a/lib_pypy/pypy_test/test_transaction.py
+++ b/lib_pypy/pypy_test/test_transaction.py
@@ -1,6 +1,7 @@
from lib_pypy import transaction
N = 1000
+VERBOSE = False
def test_simple_random_order():
@@ -9,8 +10,9 @@
for i in range(10):
transaction.add(lst.append, i)
transaction.run()
- print lst
- assert sorted(lst) == range(10)
+ if VERBOSE:
+ print lst
+ assert sorted(lst) == range(10), lst
def test_simple_fixed_order():
for x in range(N):
@@ -22,8 +24,9 @@
transaction.add(do_stuff, i)
transaction.add(do_stuff, 0)
transaction.run()
- print lst
- assert lst == range(10)
+ if VERBOSE:
+ print lst
+ assert lst == range(10), lst
def test_simple_random_and_fixed_order():
for x in range(N):
@@ -36,8 +39,9 @@
for i in range(5):
transaction.add(do_stuff, i, 0)
transaction.run()
- print lsts
- assert lsts == (range(10),) * 5
+ if VERBOSE:
+ print lsts
+ assert lsts == (range(10),) * 5, lsts
def test_raise():
class FooError(Exception):
@@ -60,15 +64,16 @@
pass
else:
raise AssertionError("should have raised FooError")
- print lsts
+ if VERBOSE:
+ print lsts
num_foos = 0
for lst in lsts:
if len(lst) < 5:
- assert lst == range(len(lst))
+ assert lst == range(len(lst)), lst
else:
- assert lst == range(5) + ['foo']
+ assert lst == range(5) + ['foo'], lst
num_foos += 1
- assert num_foos == 1
+ assert num_foos == 1, lsts
def run_tests():
_______________________________________________
pypy-commit mailing list
[email protected]
http://mail.python.org/mailman/listinfo/pypy-commit