From 3bf20c7c7be2a2578b8b50e2141ee1c8c37e04b4 Mon Sep 17 00:00:00 2001 From: Florian Bruhin Date: Mon, 18 Jan 2016 08:07:32 +0100 Subject: [PATCH] tests: Adjust check_contents comparison. When doing the read() during the assert we'd get a weird pytest output which doesn't make sense. --- tests/integration/features/conftest.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/tests/integration/features/conftest.py b/tests/integration/features/conftest.py index d54a00cad..196ba7382 100644 --- a/tests/integration/features/conftest.py +++ b/tests/integration/features/conftest.py @@ -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}"'))