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:
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user