tests: Clean up check_history
This commit is contained in:
parent
9f94f28181
commit
4296a61b9a
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user