def test_safe_repr(self): |
-> session = self.mainsession(datadir/'brokenrepr.py') |
out = self.file.getvalue() |
print 'Output of simulated "py.test brokenrepr.py":' |
print out |
|
l = session.getitemoutcomepairs(Failed) |
assert len(l) == 2 |
assert out.find("""[Exception("Ha Ha fooled you, I'm a broken repr().") raised in repr()]""" |
assert out.find("[unknown exception raised in repr()]") != -1 |