[pypy-svn] r8195 - pypy/branch/src-pytest/pypy/tool

pedronis at codespeak.net pedronis at codespeak.net
Mon Jan 10 16:26:59 CET 2005


Author: pedronis
Date: Mon Jan 10 16:26:59 2005
New Revision: 8195

Modified:
   pypy/branch/src-pytest/pypy/tool/utestconvert.py
Log:
use less clash-prone fully qualified py.test.raises to simplify 
fiximport life for deciding whether to import py.test. 

Probably we should have a flag for the general case to choose between 
the short and the fully qual form, and maybe utestconvert itself should 
add the import py.test or from py.test import raises?



Modified: pypy/branch/src-pytest/pypy/tool/utestconvert.py
==============================================================================
--- pypy/branch/src-pytest/pypy/tool/utestconvert.py	(original)
+++ pypy/branch/src-pytest/pypy/tool/utestconvert.py	Mon Jan 10 16:26:59 2005
@@ -11,7 +11,7 @@
 #  function.
 
 # Old Unittest Name             new name         operator  # of args
-d['assertRaises']           = ('raises',               '', ['Any'])
+d['assertRaises']           = ('py.test.raises',               '', ['Any'])
 d['fail']                   = ('raise AssertionError', '', [0,1])
 d['assert_']                = ('assert',               '', [1,2])
 d['failIf']                 = ('assert not',           '', [1,2])



More information about the Pypy-commit mailing list