Fix some a/an misspellings

Thanks to https://github.com/jwilk/anorack
This commit is contained in:
Florian Bruhin 2016-07-05 08:34:03 +02:00
parent e3c6a0b766
commit 70117265d6
36 changed files with 75 additions and 75 deletions

View File

@ -116,7 +116,7 @@ Fixed
`-v` argument for `:spawn` or pass flags to the spawned commands. `-v` argument for `:spawn` or pass flags to the spawned commands.
- Various fixes for hinting corner-cases where following a link didn't work or - Various fixes for hinting corner-cases where following a link didn't work or
the hint was drawn at the wrong position. the hint was drawn at the wrong position.
- Fixed crash when downloading from an URL with SSL errors - Fixed crash when downloading from a URL with SSL errors
- Close file handles correctly when a download failed - Close file handles correctly when a download failed
- Fixed crash when using `;Y` (`:hint links yank-primary`) on a system without - Fixed crash when using `;Y` (`:hint links yank-primary`) on a system without
primary selection primary selection
@ -125,7 +125,7 @@ Fixed
- Fixed a crash when entering `:-- ` in the commandline - Fixed a crash when entering `:-- ` in the commandline
- Fixed `:debug-console` with PyQt 5.6 - Fixed `:debug-console` with PyQt 5.6
- Fixed qutebrowser not starting when `sys.stderr` is `None` - Fixed qutebrowser not starting when `sys.stderr` is `None`
- Fixed crash when cancelling a download which belongs to a MHTML download - Fixed crash when cancelling a download which belongs to an MHTML download
- Fixed rebinding of keybindings being case-sensitive - Fixed rebinding of keybindings being case-sensitive
- Fix for tab indicators getting lost when moving tabs - Fix for tab indicators getting lost when moving tabs
- Fixed handling of backspace in number hinting mode - Fixed handling of backspace in number hinting mode
@ -527,7 +527,7 @@ Fixed
~~~~~ ~~~~~
- Scrolling should now work more reliably on some pages where arrow keys worked but `hjkl` didn't. - Scrolling should now work more reliably on some pages where arrow keys worked but `hjkl` didn't.
- Small improvements when checking if an input is an URL or not. - Small improvements when checking if an input is a URL or not.
- Fixed wrong cursor position when completing the first item in the completion. - Fixed wrong cursor position when completing the first item in the completion.
- Fixed exception when using search engines with {foo} in their name. - Fixed exception when using search engines with {foo} in their name.
- Fixed a bug where the same title was shown for all tabs on some systems. - Fixed a bug where the same title was shown for all tabs on some systems.
@ -539,7 +539,7 @@ Fixed
- Various fixes for deprecated key bindings and auto-migrations. - Various fixes for deprecated key bindings and auto-migrations.
- Workaround for qutebrowser not starting when there are NUL-bytes in the history (because of a currently unknown bug). - Workaround for qutebrowser not starting when there are NUL-bytes in the history (because of a currently unknown bug).
- Fixed handling of keybindings containing Ctrl/Meta on OS X. - Fixed handling of keybindings containing Ctrl/Meta on OS X.
- Fixed crash when downloading an URL without filename (e.g. magnet links) via "Save as...". - Fixed crash when downloading a URL without filename (e.g. magnet links) via "Save as...".
- Fixed exception when starting qutebrowser with `:set` as argument. - Fixed exception when starting qutebrowser with `:set` as argument.
- Fixed horrible completion performance when the `shrink` option was set. - Fixed horrible completion performance when the `shrink` option was set.
- Sessions now store zoom/scroll-position correctly. - Sessions now store zoom/scroll-position correctly.
@ -690,7 +690,7 @@ Fixed
- Scroll completion to top when showing it. - Scroll completion to top when showing it.
- Handle unencodable file paths in config types correctly. - Handle unencodable file paths in config types correctly.
- Fix for crash when executing a delayed command (because of a shadowed keybinding) and then unfocusing the window. - Fix for crash when executing a delayed command (because of a shadowed keybinding) and then unfocusing the window.
- Fix for crash when hinting on a page which doesn't have an URL yet. - Fix for crash when hinting on a page which doesn't have a URL yet.
- Fix exception when using `:set-cmd-text` with an empty argument. - Fix exception when using `:set-cmd-text` with an empty argument.
- Add a timeout to pastebin HTTP replies. - Add a timeout to pastebin HTTP replies.
- Various other fixes for small/rare bugs. - Various other fixes for small/rare bugs.

View File

@ -1666,7 +1666,7 @@ Colors used in the UI.
A value can be in one of the following format: A value can be in one of the following format:
* `#RGB`/`#RRGGBB`/`#RRRGGGBBB`/`#RRRRGGGGBBBB` * `#RGB`/`#RRGGBB`/`#RRRGGGBBB`/`#RRRRGGGGBBBB`
* A SVG color name as specified in http://www.w3.org/TR/SVG/types.html#ColorKeywords[the W3C specification]. * An SVG color name as specified in http://www.w3.org/TR/SVG/types.html#ColorKeywords[the W3C specification].
* transparent (no color) * transparent (no color)
* `rgb(r, g, b)` / `rgba(r, g, b, a)` (values 0-255 or percentages) * `rgb(r, g, b)` / `rgba(r, g, b, a)` (values 0-255 or percentages)
* `hsv(h, s, v)` / `hsva(h, s, v, a)` (values 0-255, hue 0-359) * `hsv(h, s, v)` / `hsva(h, s, v, a)` (values 0-255, hue 0-359)

View File

@ -61,7 +61,7 @@ die() {
} }
javascript_escape() { javascript_escape() {
# print the first argument in a escaped way, such that it can safely # print the first argument in an escaped way, such that it can safely
# be used within javascripts double quotes # be used within javascripts double quotes
sed "s,[\\\'\"],\\\&,g" <<< "$1" sed "s,[\\\'\"],\\\&,g" <<< "$1"
} }

View File

@ -362,7 +362,7 @@ def on_focus_changed(_old, new):
@pyqtSlot(QUrl) @pyqtSlot(QUrl)
def open_desktopservices_url(url): def open_desktopservices_url(url):
"""Handler to open an URL via QDesktopServices.""" """Handler to open a URL via QDesktopServices."""
win_id = mainwindow.get_window(via_ipc=True, force_window=False) win_id = mainwindow.get_window(via_ipc=True, force_window=False)
tabbed_browser = objreg.get('tabbed-browser', scope='window', tabbed_browser = objreg.get('tabbed-browser', scope='window',
window=win_id) window=win_id)
@ -496,7 +496,7 @@ class Quitter:
else: else:
path = os.path.abspath(os.path.dirname(qutebrowser.__file__)) path = os.path.abspath(os.path.dirname(qutebrowser.__file__))
if not os.path.isdir(path): if not os.path.isdir(path):
# Probably running from an python egg. # Probably running from a python egg.
return return
for dirpath, _dirnames, filenames in os.walk(path): for dirpath, _dirnames, filenames in os.walk(path):
@ -529,7 +529,7 @@ class Quitter:
cwd = os.path.join(os.path.abspath(os.path.dirname( cwd = os.path.join(os.path.abspath(os.path.dirname(
qutebrowser.__file__)), '..') qutebrowser.__file__)), '..')
if not os.path.isdir(cwd): if not os.path.isdir(cwd):
# Probably running from an python egg. Let's fallback to # Probably running from a python egg. Let's fallback to
# cwd=None and see if that works out. # cwd=None and see if that works out.
# See https://github.com/The-Compiler/qutebrowser/issues/323 # See https://github.com/The-Compiler/qutebrowser/issues/323
cwd = None cwd = None

View File

@ -48,7 +48,7 @@ def guess_zip_filename(zf):
def get_fileobj(byte_io): def get_fileobj(byte_io):
"""Get an usable file object to read the hosts file from.""" """Get a usable file object to read the hosts file from."""
byte_io.seek(0) # rewind downloaded file byte_io.seek(0) # rewind downloaded file
if zipfile.is_zipfile(byte_io): if zipfile.is_zipfile(byte_io):
byte_io.seek(0) # rewind what zipfile.is_zipfile did byte_io.seek(0) # rewind what zipfile.is_zipfile did

View File

@ -1247,7 +1247,7 @@ class CommandDispatcher:
filename=dest) filename=dest)
def _download_mhtml(self, dest=None): def _download_mhtml(self, dest=None):
"""Download the current page as a MHTML file, including all assets. """Download the current page as an MHTML file, including all assets.
Args: Args:
dest: The file path to write the download to. dest: The file path to write the download to.

View File

@ -69,7 +69,7 @@ def _generate_pdfjs_script(url):
def fix_urls(asset): def fix_urls(asset):
"""Take a html page and replace each relative URL with an absolute. """Take an html page and replace each relative URL with an absolute.
This is specialized for pdf.js files and not a general purpose function. This is specialized for pdf.js files and not a general purpose function.

View File

@ -678,7 +678,7 @@ class DownloadItem(QObject):
self.raw_headers[bytes(key)] = bytes(value) self.raw_headers[bytes(key)] = bytes(value)
def _handle_redirect(self): def _handle_redirect(self):
"""Handle a HTTP redirect. """Handle an HTTP redirect.
Return: Return:
True if the download was redirected, False otherwise. True if the download was redirected, False otherwise.
@ -1041,7 +1041,7 @@ class DownloadManager(QAbstractListModel):
@pyqtSlot(QNetworkRequest, QNetworkReply) @pyqtSlot(QNetworkRequest, QNetworkReply)
def on_redirect(self, download, request, reply): def on_redirect(self, download, request, reply):
"""Handle a HTTP redirect of a download. """Handle an HTTP redirect of a download.
Args: Args:
download: The old DownloadItem. download: The old DownloadItem.

View File

@ -125,7 +125,7 @@ class WebHistoryInterface(QWebHistoryInterface):
pass pass
def historyContains(self, url_string): def historyContains(self, url_string):
"""Called by WebKit to determine if an URL is contained in the history. """Called by WebKit to determine if a URL is contained in the history.
Args: Args:
url_string: The URL (as string) to check for. url_string: The URL (as string) to check for.
@ -285,10 +285,10 @@ class WebHistory(QObject):
self.cleared.emit() self.cleared.emit()
def add_url(self, url, title="", *, redirect=False, atime=None): def add_url(self, url, title="", *, redirect=False, atime=None):
"""Called by WebKit when an URL should be added to the history. """Called by WebKit when a URL should be added to the history.
Args: Args:
url: An url (as QUrl) to add to the history. url: A url (as QUrl) to add to the history.
redirect: Whether the entry was redirected to another URL redirect: Whether the entry was redirected to another URL
(hidden in completion) (hidden in completion)
atime: Override the atime used to add the entry atime: Override the atime used to add the entry

View File

@ -17,7 +17,7 @@
# You should have received a copy of the GNU General Public License # You should have received a copy of the GNU General Public License
# along with qutebrowser. If not, see <http://www.gnu.org/licenses/>. # along with qutebrowser. If not, see <http://www.gnu.org/licenses/>.
"""Utils for writing a MHTML file.""" """Utils for writing an MHTML file."""
import functools import functools
import io import io
@ -83,7 +83,7 @@ def _get_css_imports_cssutils(data, inline=False):
Args: Args:
data: The content of the stylesheet to scan as string. data: The content of the stylesheet to scan as string.
inline: True if the argument is a inline HTML style attribute. inline: True if the argument is an inline HTML style attribute.
""" """
# We don't care about invalid CSS data, this will only litter the log # We don't care about invalid CSS data, this will only litter the log
# output with CSS errors # output with CSS errors
@ -112,7 +112,7 @@ def _get_css_imports(data, inline=False):
Args: Args:
data: The content of the stylesheet to scan as string. data: The content of the stylesheet to scan as string.
inline: True if the argument is a inline HTML style attribute. inline: True if the argument is an inline HTML style attribute.
""" """
if cssutils is None: if cssutils is None:
return _get_css_imports_regex(data) return _get_css_imports_regex(data)
@ -149,7 +149,7 @@ E_QUOPRI = email.encoders.encode_quopri
class MHTMLWriter: class MHTMLWriter:
"""A class for outputting multiple files to a MHTML document. """A class for outputting multiple files to an MHTML document.
Attributes: Attributes:
root_content: The root content as bytes. root_content: The root content as bytes.
@ -480,7 +480,7 @@ class _NoCloseBytesIO(io.BytesIO):
def _start_download(dest, web_view): def _start_download(dest, web_view):
"""Start downloading the current page and all assets to a MHTML file. """Start downloading the current page and all assets to an MHTML file.
This will overwrite dest if it already exists. This will overwrite dest if it already exists.

View File

@ -89,7 +89,7 @@ class QuteSchemeHandler(schemehandler.SchemeHandler):
""" """
path = request.url().path() path = request.url().path()
host = request.url().host() host = request.url().host()
# An url like "qute:foo" is split as "scheme:path", not "scheme:host". # A url like "qute:foo" is split as "scheme:path", not "scheme:host".
log.misc.debug("url: {}, path: {}, host {}".format( log.misc.debug("url: {}, path: {}, host {}".format(
request.url().toDisplayString(), path, host)) request.url().toDisplayString(), path, host))
try: try:

View File

@ -59,7 +59,7 @@ class TabHistoryItem:
def _encode_url(url): def _encode_url(url):
"""Encode an QUrl suitable to pass to QWebHistory.""" """Encode a QUrl suitable to pass to QWebHistory."""
data = bytes(QUrl.toPercentEncoding(url.toString(), b':/#?&+=@%*')) data = bytes(QUrl.toPercentEncoding(url.toString(), b':/#?&+=@%*'))
return data.decode('ascii') return data.decode('ascii')

View File

@ -25,7 +25,7 @@ Defined here to avoid circular dependency hell.
class CommandError(Exception): class CommandError(Exception):
"""Raised when a command encounters a error while running.""" """Raised when a command encounters an error while running."""
pass pass

View File

@ -20,7 +20,7 @@
"""Global instances of the completion models. """Global instances of the completion models.
Module attributes: Module attributes:
_instances: An dict of available completions. _instances: A dict of available completions.
INITIALIZERS: A {usertypes.Completion: callable} dict of functions to INITIALIZERS: A {usertypes.Completion: callable} dict of functions to
initialize completions. initialize completions.
""" """

View File

@ -310,7 +310,7 @@ class ConfigManager(QObject):
sections: The configuration data as an OrderedDict. sections: The configuration data as an OrderedDict.
_fname: The filename to be opened. _fname: The filename to be opened.
_configdir: The dictionary to read the config from and save it in. _configdir: The dictionary to read the config from and save it in.
_interpolation: An configparser.Interpolation object _interpolation: A configparser.Interpolation object
_proxies: configparser.SectionProxy objects for sections. _proxies: configparser.SectionProxy objects for sections.
_initialized: Whether the ConfigManager is fully initialized yet. _initialized: Whether the ConfigManager is fully initialized yet.

View File

@ -94,7 +94,7 @@ SECTION_DESC = {
"Colors used in the UI.\n" "Colors used in the UI.\n"
"A value can be in one of the following format:\n\n" "A value can be in one of the following format:\n\n"
" * `#RGB`/`#RRGGBB`/`#RRRGGGBBB`/`#RRRRGGGGBBBB`\n" " * `#RGB`/`#RRGGBB`/`#RRRGGGBBB`/`#RRRRGGGGBBBB`\n"
" * A SVG color name as specified in http://www.w3.org/TR/SVG/" " * An SVG color name as specified in http://www.w3.org/TR/SVG/"
"types.html#ColorKeywords[the W3C specification].\n" "types.html#ColorKeywords[the W3C specification].\n"
" * transparent (no color)\n" " * transparent (no color)\n"
" * `rgb(r, g, b)` / `rgba(r, g, b, a)` (values 0-255 or " " * `rgb(r, g, b)` / `rgba(r, g, b, a)` (values 0-255 or "

View File

@ -481,7 +481,7 @@ class IntList(List):
class Float(BaseType): class Float(BaseType):
"""Base class for an float setting. """Base class for a float setting.
Attributes: Attributes:
minval: Minimum value (inclusive). minval: Minimum value (inclusive).
@ -1644,7 +1644,7 @@ class UserAgent(BaseType):
class TimestampTemplate(BaseType): class TimestampTemplate(BaseType):
"""A strftime-like template for timestamps. """An strftime-like template for timestamps.
See See
https://docs.python.org/3/library/datetime.html#strftime-strptime-behavior https://docs.python.org/3/library/datetime.html#strftime-strptime-behavior

View File

@ -270,7 +270,7 @@ class TabbedBrowser(tabwidget.TabWidget):
entry = UndoEntry(tab.cur_url, history_data) entry = UndoEntry(tab.cur_url, history_data)
self._undo_stack.append(entry) self._undo_stack.append(entry)
elif tab.cur_url.isEmpty(): elif tab.cur_url.isEmpty():
# There are some good reasons why an URL could be empty # There are some good reasons why a URL could be empty
# (target="_blank" with a download, see [1]), so we silently ignore # (target="_blank" with a download, see [1]), so we silently ignore
# this. # this.
# [1] https://github.com/The-Compiler/qutebrowser/issues/163 # [1] https://github.com/The-Compiler/qutebrowser/issues/163

View File

@ -17,7 +17,7 @@
# You should have received a copy of the GNU General Public License # You should have received a copy of the GNU General Public License
# along with qutebrowser. If not, see <http://www.gnu.org/licenses/>. # along with qutebrowser. If not, see <http://www.gnu.org/licenses/>.
"""A HTTP client based on QNetworkAccessManager.""" """An HTTP client based on QNetworkAccessManager."""
import functools import functools
import urllib.request import urllib.request
@ -30,7 +30,7 @@ from PyQt5.QtNetwork import (QNetworkAccessManager, QNetworkRequest,
class HTTPClient(QObject): class HTTPClient(QObject):
"""A HTTP client based on QNetworkAccessManager. """An HTTP client based on QNetworkAccessManager.
Intended for APIs, automatically decodes data. Intended for APIs, automatically decodes data.

View File

@ -26,7 +26,7 @@ from PyQt5.QtWidgets import QMessageBox
def msgbox(parent, title, text, *, icon, buttons=QMessageBox.Ok, def msgbox(parent, title, text, *, icon, buttons=QMessageBox.Ok,
on_finished=None, plain_text=None): on_finished=None, plain_text=None):
"""Display an QMessageBox with the given icon. """Display a QMessageBox with the given icon.
Args: Args:
parent: The parent to set for the message box. parent: The parent to set for the message box.

View File

@ -311,7 +311,7 @@ class MessageBridge(QObject):
self.s_error.emit(msg, immediately) self.s_error.emit(msg, immediately)
def warning(self, msg, immediately=False, *, log_stack=True): def warning(self, msg, immediately=False, *, log_stack=True):
"""Display an warning in the statusbar. """Display a warning in the statusbar.
Args: Args:
msg: The message to show. msg: The message to show.

View File

@ -168,7 +168,7 @@ def fuzzy_url(urlstr, cwd=None, relative=False, do_search=True,
relative: Whether to resolve relative files. relative: Whether to resolve relative files.
do_search: Whether to perform a search on non-URLs. do_search: Whether to perform a search on non-URLs.
force_search: Whether to force a search even if the content can be force_search: Whether to force a search even if the content can be
interpreted as an URL or a path. interpreted as a URL or a path.
Return: Return:
A target QUrl to a search page or the original URL. A target QUrl to a search page or the original URL.
@ -200,7 +200,7 @@ def fuzzy_url(urlstr, cwd=None, relative=False, do_search=True,
def _has_explicit_scheme(url): def _has_explicit_scheme(url):
"""Check if an url has an explicit scheme given. """Check if a url has an explicit scheme given.
Args: Args:
url: The URL as QUrl. url: The URL as QUrl.
@ -208,7 +208,7 @@ def _has_explicit_scheme(url):
# Note that generic URI syntax actually would allow a second colon # Note that generic URI syntax actually would allow a second colon
# after the scheme delimiter. Since we don't know of any URIs # after the scheme delimiter. Since we don't know of any URIs
# using this and want to support e.g. searching for scoped C++ # using this and want to support e.g. searching for scoped C++
# symbols, we treat this as not an URI anyways. # symbols, we treat this as not a URI anyways.
return (url.isValid() and url.scheme() and return (url.isValid() and url.scheme() and
(url.host() or url.path()) and (url.host() or url.path()) and
not url.path().startswith(' ') and not url.path().startswith(' ') and
@ -268,7 +268,7 @@ def is_url(urlstr):
url = True url = True
elif is_special_url(qurl): elif is_special_url(qurl):
# Special URLs are always URLs, even with autosearch=False # Special URLs are always URLs, even with autosearch=False
log.url.debug("Is an special URL.") log.url.debug("Is a special URL.")
url = True url = True
elif autosearch == 'dns': elif autosearch == 'dns':
log.url.debug("Checking via DNS check") log.url.debug("Checking via DNS check")
@ -321,7 +321,7 @@ def qurl_from_user_input(urlstr):
def invalid_url_error(win_id, url, action): def invalid_url_error(win_id, url, action):
"""Display an error message for an URL. """Display an error message for a URL.
Args: Args:
win_id: The window ID to show the error message in. win_id: The window ID to show the error message in.
@ -380,7 +380,7 @@ def get_path_if_valid(pathstr, cwd=None, relative=False, check_exists=False):
def filename_from_url(url): def filename_from_url(url):
"""Get a suitable filename from an URL. """Get a suitable filename from a URL.
Args: Args:
url: The URL to parse, as a QUrl. url: The URL to parse, as a QUrl.
@ -426,7 +426,7 @@ def host_tuple(url):
def get_errstring(url, base="Invalid URL"): def get_errstring(url, base="Invalid URL"):
"""Get an error string for an URL. """Get an error string for a URL.
Args: Args:
url: The URL as a QUrl. url: The URL as a QUrl.
@ -500,7 +500,7 @@ class IncDecError(Exception):
def _get_incdec_value(match, incdec, url): def _get_incdec_value(match, incdec, url):
"""Get a incremented/decremented URL based on a URL match.""" """Get an incremented/decremented URL based on a URL match."""
pre, zeroes, number, post = match.groups() pre, zeroes, number, post = match.groups()
# This should always succeed because we match \d+ # This should always succeed because we match \d+
val = int(number) val = int(number)

View File

@ -3,7 +3,7 @@
<title>test case for issue 1535</title> <title>test case for issue 1535</title>
</head> </head>
<body> <body>
<p>Cancelling a download that belongs to a mhtml download.</p> <p>Cancelling a download that belongs to an mhtml download.</p>
<p>See also <a href="https://github.com/The-Compiler/qutebrowser/issues/1535">GitHub</a></p> <p>See also <a href="https://github.com/The-Compiler/qutebrowser/issues/1535">GitHub</a></p>
<!-- <!--
Use drip so we have a chance to cancel the download before Use drip so we have a chance to cancel the download before

View File

@ -47,7 +47,7 @@ Feature: Downloading things from a website.
Scenario: Downloading with SSL errors (issue 1413) Scenario: Downloading with SSL errors (issue 1413)
When I run :debug-clear-ssl-errors When I run :debug-clear-ssl-errors
And I set network -> ssl-strict to ask And I set network -> ssl-strict to ask
And I download a SSL page And I download an SSL page
And I wait for "Entering mode KeyMode.* (reason: question asked)" in the log And I wait for "Entering mode KeyMode.* (reason: question asked)" in the log
And I run :prompt-accept And I run :prompt-accept
Then the error "Download error: SSL handshake failed" should be shown Then the error "Download error: SSL handshake failed" should be shown
@ -80,7 +80,7 @@ Feature: Downloading things from a website.
Then the warning ":download [url] [dest] is deprecated - use download --dest [dest] [url]" should be shown Then the warning ":download [url] [dest] is deprecated - use download --dest [dest] [url]" should be shown
And the error "Can't give two destinations for the download." should be shown And the error "Can't give two destinations for the download." should be shown
Scenario: :download --mhtml with an URL given Scenario: :download --mhtml with a URL given
When I run :download --mhtml http://foobar/ When I run :download --mhtml http://foobar/
Then the error "Can only download the current page as mhtml." should be shown Then the error "Can only download the current page as mhtml." should be shown
@ -127,7 +127,7 @@ Feature: Downloading things from a website.
And "cancelled" should be logged And "cancelled" should be logged
# https://github.com/The-Compiler/qutebrowser/issues/1535 # https://github.com/The-Compiler/qutebrowser/issues/1535
Scenario: Cancelling a MHTML download (issue 1535) Scenario: Cancelling an MHTML download (issue 1535)
When I open data/downloads/issue1535.html When I open data/downloads/issue1535.html
And I run :download --mhtml And I run :download --mhtml
And I wait for "fetch: PyQt5.QtCore.QUrl('http://localhost:*/drip?numbytes=128&duration=2') -> drip" in the log And I wait for "fetch: PyQt5.QtCore.QUrl('http://localhost:*/drip?numbytes=128&duration=2') -> drip" in the log

View File

@ -2,13 +2,13 @@ Feature: Opening external editors
## :edit-url ## :edit-url
Scenario: Editing an URL Scenario: Editing a URL
When I open data/numbers/1.txt When I open data/numbers/1.txt
And I set up a fake editor replacing "1.txt" by "2.txt" And I set up a fake editor replacing "1.txt" by "2.txt"
And I run :edit-url And I run :edit-url
Then data/numbers/2.txt should be loaded Then data/numbers/2.txt should be loaded
Scenario: Editing an URL with -t Scenario: Editing a URL with -t
When I run :tab-only When I run :tab-only
And I open data/numbers/1.txt And I open data/numbers/1.txt
And I set up a fake editor replacing "1.txt" by "2.txt" And I set up a fake editor replacing "1.txt" by "2.txt"
@ -18,7 +18,7 @@ Feature: Opening external editors
- data/numbers/1.txt - data/numbers/1.txt
- data/numbers/2.txt (active) - data/numbers/2.txt (active)
Scenario: Editing an URL with -b Scenario: Editing a URL with -b
When I run :tab-only When I run :tab-only
And I open data/numbers/1.txt And I open data/numbers/1.txt
And I set up a fake editor replacing "1.txt" by "2.txt" And I set up a fake editor replacing "1.txt" by "2.txt"
@ -28,7 +28,7 @@ Feature: Opening external editors
- data/numbers/1.txt (active) - data/numbers/1.txt (active)
- data/numbers/2.txt - data/numbers/2.txt
Scenario: Editing an URL with -w Scenario: Editing a URL with -w
When I open data/numbers/1.txt in a new tab When I open data/numbers/1.txt in a new tab
And I run :tab-only And I run :tab-only
And I set up a fake editor replacing "1.txt" by "2.txt" And I set up a fake editor replacing "1.txt" by "2.txt"
@ -47,11 +47,11 @@ Feature: Opening external editors
- active: true - active: true
url: http://localhost:*/data/numbers/2.txt url: http://localhost:*/data/numbers/2.txt
Scenario: Editing an URL with -t and -b Scenario: Editing a URL with -t and -b
When I run :edit-url -t -b When I run :edit-url -t -b
Then the error "Only one of -t/-b/-w can be given!" should be shown Then the error "Only one of -t/-b/-w can be given!" should be shown
Scenario: Editing an URL with invalid URL Scenario: Editing a URL with invalid URL
When I set general -> auto-search to false When I set general -> auto-search to false
And I open data/hello.txt And I open data/hello.txt
And I set up a fake editor replacing "http://localhost:(port)/data/hello.txt" by "foo!" And I set up a fake editor replacing "http://localhost:(port)/data/hello.txt" by "foo!"

View File

@ -107,7 +107,7 @@ Feature: Using hints
And the javascript message "bop!" should be logged And the javascript message "bop!" should be logged
And the javascript message "boop!" should be logged And the javascript message "boop!" should be logged
Scenario: Using :hint run with an URL containing spaces Scenario: Using :hint run with a URL containing spaces
When I open data/hints/html/with_spaces.html When I open data/hints/html/with_spaces.html
And I run :hint all run message-info {hint-url} And I run :hint all run message-info {hint-url}
And I run :follow-hint a And I run :follow-hint a

View File

@ -84,7 +84,7 @@ Feature: Prompts
Scenario: SSL error with ssl-strict = false Scenario: SSL error with ssl-strict = false
When I run :debug-clear-ssl-errors When I run :debug-clear-ssl-errors
And I set network -> ssl-strict to false And I set network -> ssl-strict to false
And I load a SSL page And I load an SSL page
And I wait until the SSL page finished loading And I wait until the SSL page finished loading
Then the error "SSL error: *" should be shown Then the error "SSL error: *" should be shown
And the page should contain the plaintext "Hello World via SSL!" And the page should contain the plaintext "Hello World via SSL!"
@ -92,14 +92,14 @@ Feature: Prompts
Scenario: SSL error with ssl-strict = true Scenario: SSL error with ssl-strict = true
When I run :debug-clear-ssl-errors When I run :debug-clear-ssl-errors
And I set network -> ssl-strict to true And I set network -> ssl-strict to true
And I load a SSL page And I load an SSL page
Then "Error while loading *: SSL handshake failed" should be logged Then "Error while loading *: SSL handshake failed" should be logged
And the page should contain the plaintext "Unable to load page" And the page should contain the plaintext "Unable to load page"
Scenario: SSL error with ssl-strict = ask -> yes Scenario: SSL error with ssl-strict = ask -> yes
When I run :debug-clear-ssl-errors When I run :debug-clear-ssl-errors
And I set network -> ssl-strict to ask And I set network -> ssl-strict to ask
And I load a SSL page And I load an SSL page
And I wait for a prompt And I wait for a prompt
And I run :prompt-yes And I run :prompt-yes
And I wait until the SSL page finished loading And I wait until the SSL page finished loading
@ -108,7 +108,7 @@ Feature: Prompts
Scenario: SSL error with ssl-strict = ask -> no Scenario: SSL error with ssl-strict = ask -> no
When I run :debug-clear-ssl-errors When I run :debug-clear-ssl-errors
And I set network -> ssl-strict to ask And I set network -> ssl-strict to ask
And I load a SSL page And I load an SSL page
And I wait for a prompt And I wait for a prompt
And I run :prompt-no And I run :prompt-no
Then "Error while loading *: SSL handshake failed" should be logged Then "Error while loading *: SSL handshake failed" should be logged

View File

@ -41,7 +41,7 @@ def wait_for_download_finished(quteproc):
quteproc.wait_for(category='downloads', message='Download finished') quteproc.wait_for(category='downloads', message='Download finished')
@bdd.when("I download a SSL page") @bdd.when("I download an SSL page")
def download_ssl_page(quteproc, ssl_server): def download_ssl_page(quteproc, ssl_server):
quteproc.send_cmd(':download https://localhost:{}/' quteproc.send_cmd(':download https://localhost:{}/'
.format(ssl_server.port)) .format(ssl_server.port))

View File

@ -21,7 +21,7 @@ import pytest_bdd as bdd
bdd.scenarios('prompts.feature') bdd.scenarios('prompts.feature')
@bdd.when("I load a SSL page") @bdd.when("I load an SSL page")
def load_ssl_page(quteproc, ssl_server): def load_ssl_page(quteproc, ssl_server):
# We don't wait here as we can get an SSL question. # We don't wait here as we can get an SSL question.
quteproc.open_path('/', port=ssl_server.port, https=True, wait=False) quteproc.open_path('/', port=ssl_server.port, https=True, wait=False)

View File

@ -47,14 +47,14 @@ Feature: Yanking and pasting.
#### :paste #### :paste
Scenario: Pasting an URL Scenario: Pasting a URL
When I put "http://localhost:(port)/data/hello.txt" into the clipboard When I put "http://localhost:(port)/data/hello.txt" into the clipboard
And I run :paste And I run :paste
And I wait until data/hello.txt is loaded And I wait until data/hello.txt is loaded
Then the requests should be: Then the requests should be:
data/hello.txt data/hello.txt
Scenario: Pasting an URL from primary selection Scenario: Pasting a URL from primary selection
When selection is supported When selection is supported
And I put "http://localhost:(port)/data/hello2.txt" into the primary selection And I put "http://localhost:(port)/data/hello2.txt" into the primary selection
And I run :paste --sel And I run :paste --sel
@ -151,7 +151,7 @@ Feature: Yanking and pasting.
- about:blank - about:blank
- data/hello.txt?q=this%20url%3A%0Ahttp%3A//qutebrowser.org%0Ashould%20not%20open (active) - data/hello.txt?q=this%20url%3A%0Ahttp%3A//qutebrowser.org%0Ashould%20not%20open (active)
Scenario: Pasting multiline whose first line looks like an URI Scenario: Pasting multiline whose first line looks like a URI
Given I open about:blank Given I open about:blank
When I run :tab-only When I run :tab-only
When I set searchengines -> DEFAULT to http://localhost:(port)/data/hello.txt?q={} When I set searchengines -> DEFAULT to http://localhost:(port)/data/hello.txt?q={}

View File

@ -146,8 +146,8 @@ class QuteProc(testprocess.Process):
_focus_ready: Whether the main window got focused. _focus_ready: Whether the main window got focused.
_load_ready: Whether the about:blank page got loaded. _load_ready: Whether the about:blank page got loaded.
_profile: If True, do profiling of the subprocesses. _profile: If True, do profiling of the subprocesses.
_instance_id: An unique ID for this QuteProc instance _instance_id: A unique ID for this QuteProc instance
_run_counter: A counter to get an unique ID for each run. _run_counter: A counter to get a unique ID for each run.
_config: The pytest config object _config: The pytest config object
Signals: Signals:

View File

@ -175,7 +175,7 @@ class WebserverProcess(testprocess.Process):
@pytest.yield_fixture(scope='session', autouse=True) @pytest.yield_fixture(scope='session', autouse=True)
def httpbin(qapp): def httpbin(qapp):
"""Fixture for a httpbin object which ensures clean setup/teardown.""" """Fixture for an httpbin object which ensures clean setup/teardown."""
httpbin = WebserverProcess('webserver_sub') httpbin = WebserverProcess('webserver_sub')
httpbin.start() httpbin.start()
yield httpbin yield httpbin

View File

@ -150,7 +150,7 @@ def test_parent_folder(dir_layout, quteproc):
def test_parent_with_slash(dir_layout, quteproc): def test_parent_with_slash(dir_layout, quteproc):
"""Test the parent link with an URL that has a trailing slash.""" """Test the parent link with a URL that has a trailing slash."""
quteproc.open_url(dir_layout.file_url() + '/') quteproc.open_url(dir_layout.file_url() + '/')
page = parse(quteproc) page = parse(quteproc)
assert page.parent == dir_layout.base_path() assert page.parent == dir_layout.base_path()

View File

@ -129,7 +129,7 @@ class SelectionAndFilterTests:
"""Generator for tests for TestSelectionsAndFilters.""" """Generator for tests for TestSelectionsAndFilters."""
# A mapping of a HTML element to a list of groups where the selectors # A mapping of an HTML element to a list of groups where the selectors
# (after filtering) should match. # (after filtering) should match.
# #
# Based on this, test cases are generated to make sure it matches those # Based on this, test cases are generated to make sure it matches those
@ -741,7 +741,7 @@ class TestJavascriptEscape:
"""Test conversion by hexlifying in javascript. """Test conversion by hexlifying in javascript.
Since the conversion of QStrings to Python strings is broken in some Since the conversion of QStrings to Python strings is broken in some
older PyQt versions in some corner cases, we load a HTML file which older PyQt versions in some corner cases, we load an HTML file which
generates an MD5 of the escaped text and use that for comparisons. generates an MD5 of the escaped text and use that for comparisons.
""" """
escaped = webelem.javascript_escape(text) escaped = webelem.javascript_escape(text)

View File

@ -332,7 +332,7 @@ def test_get_search_url_invalid(urlutils_config_stub, url):
(False, True, False, 'localhost test'), # no DNS because of space (False, True, False, 'localhost test'), # no DNS because of space
(False, True, False, 'another . test'), # no DNS because of space (False, True, False, 'another . test'), # no DNS because of space
(False, True, True, 'foo'), (False, True, True, 'foo'),
(False, True, False, 'this is: not an URL'), # no DNS because of space (False, True, False, 'this is: not a URL'), # no DNS because of space
(False, True, False, '23.42'), # no DNS because bogus-IP (False, True, False, '23.42'), # no DNS because bogus-IP
(False, True, False, '1337'), # no DNS because bogus-IP (False, True, False, '1337'), # no DNS because bogus-IP
(False, True, True, 'deadbeef'), (False, True, True, 'deadbeef'),
@ -344,15 +344,15 @@ def test_get_search_url_invalid(urlutils_config_stub, url):
# Valid search term with autosearch # Valid search term with autosearch
(False, False, False, 'test foo'), (False, False, False, 'test foo'),
# autosearch = False # autosearch = False
(False, True, False, 'This is an URL without autosearch'), (False, True, False, 'This is a URL without autosearch'),
]) ])
def test_is_url(urlutils_config_stub, fake_dns, is_url, is_url_no_autosearch, def test_is_url(urlutils_config_stub, fake_dns, is_url, is_url_no_autosearch,
uses_dns, url): uses_dns, url):
"""Test is_url(). """Test is_url().
Args: Args:
is_url: Whether the given string is an URL with auto-search dns/naive. is_url: Whether the given string is a URL with auto-search dns/naive.
is_url_no_autosearch: Whether the given string is an URL with is_url_no_autosearch: Whether the given string is a URL with
auto-search false. auto-search false.
uses_dns: Whether the given string should fire a DNS request for the uses_dns: Whether the given string should fire a DNS request for the
given URL. given URL.

View File

@ -34,7 +34,7 @@ class TestInit:
assert nl.items == [] assert nl.items == []
def test_items(self): def test_items(self):
"""Test constructing an NeighborList with items.""" """Test constructing a NeighborList with items."""
nl = usertypes.NeighborList([1, 2, 3]) nl = usertypes.NeighborList([1, 2, 3])
assert nl.items == [1, 2, 3] assert nl.items == [1, 2, 3]