tests: Adjust check_contents comparison.

When doing the read() during the assert we'd get a weird pytest output which
doesn't make sense.
This commit is contained in:
Florian Bruhin 2016-01-18 08:07:32 +01:00
parent 31af303d07
commit 3bf20c7c7b

View File

@ -363,7 +363,8 @@ def check_contents(quteproc, filename):
path = os.path.join(os.path.abspath(os.path.dirname(__file__)), '..',
'data', os.path.join(*filename.split('/')))
with open(path, 'r', encoding='utf-8') as f:
assert content == f.read()
file_content = f.read()
assert content == file_content
@bdd.then(bdd.parsers.parse('the page should contain the plaintext "{text}"'))