refactor assert interpretation to invoke a simple callable

and let the assertion plugin handle the hook invocation
and its multi-results and also pass in an (optional) test config
object to the hook. Add and refactor also a few tests.

--HG--
branch : trunk
This commit is contained in:
holger krekel
2010-10-02 18:47:39 +02:00
parent b56d3c223d
commit 1ff173baee
7 changed files with 123 additions and 90 deletions
+1 -1
View File
@@ -151,7 +151,7 @@ def pytest_sessionfinish(session, exitstatus):
# hooks for customising the assert methods
# -------------------------------------------------------------------------
def pytest_assert_binrepr(op, left, right):
def pytest_assert_binrepr(config, op, left, right):
"""Customise explanation for binary operators
Return None or an empty list for no custom explanation, otherwise