diff options
author | Florian Bruhin <git@the-compiler.org> | 2017-06-19 09:19:02 +0200 |
---|---|---|
committer | Ryan Roden-Corrent <ryan@rcorre.net> | 2017-06-19 07:44:11 -0400 |
commit | 4296a61b9a6cc562380c2e333bd9c3d33d772f50 (patch) | |
tree | 710df40683ea4999c8864df838061dad05a0bf3d /tests/end2end/features/test_history_bdd.py | |
parent | 9f94f28181333c8023ea96cfd10d67e60dc70491 (diff) | |
download | qutebrowser-4296a61b9a6cc562380c2e333bd9c3d33d772f50.tar.gz qutebrowser-4296a61b9a6cc562380c2e333bd9c3d33d772f50.zip |
tests: Clean up check_history
Diffstat (limited to 'tests/end2end/features/test_history_bdd.py')
-rw-r--r-- | tests/end2end/features/test_history_bdd.py | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/tests/end2end/features/test_history_bdd.py b/tests/end2end/features/test_history_bdd.py index f5639f5f3..319e36aee 100644 --- a/tests/end2end/features/test_history_bdd.py +++ b/tests/end2end/features/test_history_bdd.py @@ -32,10 +32,9 @@ def check_history(quteproc, httpbin, tmpdir, expected): quteproc.wait_for(category='message', loglevel=logging.INFO, message='Dumped history to {}'.format(path)) - with open(path, 'r', encoding='utf-8') as f: + with path.open('r', encoding='utf-8') as f: # ignore access times, they will differ in each run - actual = '\n'.join(re.sub('^\\d+-?', '', line).strip() - for line in f.read().splitlines()) + actual = '\n'.join(re.sub('^\\d+-?', '', line).strip() for line in f) expected = expected.replace('(port)', str(httpbin.port)) assert actual == expected |