to better match the naming of the corresponding AST (and in case

we want to add more customizations later)
rename pytest_assert_binrepr -> pytest_assertrepr_compare
rename binrepr -> reprcompare

--HG--
branch : trunk
This commit is contained in:
holger krekel
2010-10-02 19:00:47 +02:00
parent 1ff173baee
commit 77cacb99ee
7 changed files with 36 additions and 37 deletions

View File

@@ -178,9 +178,9 @@ class DebugInterpreter(ast.NodeVisitor):
break
left_explanation, left_result = next_explanation, next_result
binrepr = py.code._binrepr
if binrepr:
res = binrepr(op_symbol, left_result, next_result)
rcomp = py.code._reprcompare
if rcomp:
res = rcomp(op_symbol, left_result, next_result)
if res:
explanation = res
return explanation, result

View File

@@ -3,7 +3,7 @@ import py
BuiltinAssertionError = py.builtin.builtins.AssertionError
_binrepr = None # if set, will be called by assert reinterp for comparison ops
_reprcompare = None # if set, will be called by assert reinterp for comparison ops
def _format_explanation(explanation):
"""This formats an explanation