Fix pylint errors.

This commit is contained in:
Imran Sobir 2017-02-28 19:49:00 +05:00
parent 9e6b0240f6
commit cb6c6b814e
2 changed files with 6 additions and 4 deletions

View File

@ -29,7 +29,7 @@ import sys
import time
import urllib.parse
from PyQt5.QtCore import QUrl, QUrlQuery
from PyQt5.QtCore import QUrlQuery
import qutebrowser
from qutebrowser.utils import (version, utils, jinja, log, message, docutils,
@ -203,7 +203,7 @@ def qute_history(url):
if item_newer:
continue
else:
# history_dict is not reversed, we are going forward in history.
# history_dict isn't reversed, we are going forward in history.
# so:
# abort if item is newer than start_time
# skip if item is older than start_time+24hrs

View File

@ -42,7 +42,7 @@ class TestJavascriptHandler:
def patch_read_file(self, monkeypatch):
"""Patch utils.read_file to return few fake JS files."""
def _read_file(path, binary=False):
"""Faked utils.read_file"""
"""Faked utils.read_file."""
assert not binary
for filename, content in self.js_files:
if path == os.path.join('javascript', filename):
@ -75,13 +75,15 @@ class TestHistoryHandler:
"""Test the qute://history endpoint."""
# Current time
now = time.time()
@pytest.fixture
def entries(self):
"""Create fake history entries."""
# create 12 history items spaced 6 hours apart, starting from now
entry_count = 12
interval = 6 * 60 * 60
self.now = time.time()
items = []
for i in range(entry_count):