refactor explanation formatting things into their own module

This commit is contained in:
Benjamin Peterson
2011-05-26 12:01:34 -05:00
parent f423ce9c01
commit 250160b4b0
7 changed files with 37 additions and 220 deletions

View File

@@ -1,7 +1,7 @@
"PYTEST_DONT_REWRITE"
import pytest, py
from _pytest import assertion
from _pytest.assertion import util
def exvalue():
return py.std.sys.exc_info()[1]
@@ -249,7 +249,7 @@ class TestView:
@py.test.mark.skipif("sys.version_info < (2,6)")
def test_assert_customizable_reprcompare(monkeypatch):
monkeypatch.setattr(assertion, '_reprcompare', lambda *args: 'hello')
monkeypatch.setattr(util, '_reprcompare', lambda *args: 'hello')
try:
assert 3 == 4
except AssertionError: