[pypy-svn] pypy default: improve the reporting (thanks to pytest like _assert magic)

antocuni commits-noreply at bitbucket.org
Fri Mar 18 14:12:52 CET 2011


Author: Antonio Cuni <anto.cuni at gmail.com>
Branch: 
Changeset: r42785:38a48b8331fe
Date: 2011-03-18 14:07 +0100
http://bitbucket.org/pypy/pypy/changeset/38a48b8331fe/

Log:	improve the reporting (thanks to pytest like _assert magic)

diff --git a/pypy/module/pypyjit/test_pypy_c/model.py b/pypy/module/pypyjit/test_pypy_c/model.py
--- a/pypy/module/pypyjit/test_pypy_c/model.py
+++ b/pypy/module/pypyjit/test_pypy_c/model.py
@@ -274,8 +274,7 @@
     def match_descr(self, descr, exp_descr):
         if descr == exp_descr or exp_descr == '...':
             return True
-        match = exp_descr is not None and re.match(exp_descr, descr)
-        self._assert(match, "descr mismatch")
+        self._assert(exp_descr is not None and re.match(exp_descr, descr), "descr mismatch")
 
     def _assert(self, cond, message):
         if not cond:


More information about the Pypy-commit mailing list