test_implicit_bad_repr1: harden/cleanup

This commit is contained in:
Daniel Hahler 2019-03-24 11:15:40 +01:00
parent 7a6bcc3639
commit 6352cf2374
1 changed files with 2 additions and 2 deletions

View File

@ -126,14 +126,14 @@ class SessionTests(object):
) )
reprec = testdir.inline_run(p) reprec = testdir.inline_run(p)
passed, skipped, failed = reprec.listoutcomes() passed, skipped, failed = reprec.listoutcomes()
assert len(failed) == 1 assert (len(passed), len(skipped), len(failed)) == (1, 0, 1)
out = failed[0].longrepr.reprcrash.message out = failed[0].longrepr.reprcrash.message
assert ( assert (
out.find( out.find(
"""[Exception("Ha Ha fooled you, I'm a broken repr().") raised in repr()]""" """[Exception("Ha Ha fooled you, I'm a broken repr().") raised in repr()]"""
) )
!= -1 != -1
) # ' )
def test_skip_file_by_conftest(self, testdir): def test_skip_file_by_conftest(self, testdir):
testdir.makepyfile( testdir.makepyfile(