From 233cea4b62888b21c51d3b255f568a254bae6926 Mon Sep 17 00:00:00 2001 From: dwagle Date: Wed, 15 Nov 2017 15:48:21 +0545 Subject: [PATCH] discarded unnecessary comment and adjusted some code to make pylint happy, also made adjustments to pytest scenarios --- qutebrowser/browser/qutescheme.py | 6 +++--- tests/end2end/features/navigate.feature | 11 ----------- tests/end2end/features/qutescheme.feature | 11 +++++++---- 3 files changed, 10 insertions(+), 18 deletions(-) diff --git a/qutebrowser/browser/qutescheme.py b/qutebrowser/browser/qutescheme.py index cd3e48b86..11dcfe004 100644 --- a/qutebrowser/browser/qutescheme.py +++ b/qutebrowser/browser/qutescheme.py @@ -135,10 +135,10 @@ def data_for_url(url): Return: A (mimetype, data) tuple. """ - # normalize path and strip redundant trailing slashes - norm_url = url.adjusted(QUrl.NormalizePathSegments | QUrl.StripTrailingSlash) + norm_url = url.adjusted(QUrl.NormalizePathSegments | + QUrl.StripTrailingSlash) if norm_url != url: - raise Redirect(norm_url) + raise Redirect(norm_url) path = url.path() host = url.host() diff --git a/tests/end2end/features/navigate.feature b/tests/end2end/features/navigate.feature index ac244cfcb..307a6c53a 100644 --- a/tests/end2end/features/navigate.feature +++ b/tests/end2end/features/navigate.feature @@ -23,17 +23,6 @@ Feature: Using :navigate And I run :navigate up Then qute://help/ should be loaded - Scenario: Navigating up by count in qute://help/ - When I open qute://help/img/cheatsheet-big.png - And I run :navigate up with count 2 - Then qute://help/ should be loaded - - Scenario: Navigating up in qute://help/img/cheatsheet-big.png - When I open qute://help/img/cheatsheet-big.png - And I run :navigate up - Then "OSError while handling qute://* URL" should be logged - And "* url='qute://help/img'* LoadStatus.error" should be logged - # prev/next Scenario: Navigating to previous page diff --git a/tests/end2end/features/qutescheme.feature b/tests/end2end/features/qutescheme.feature index 36a0ed614..e4ae20215 100644 --- a/tests/end2end/features/qutescheme.feature +++ b/tests/end2end/features/qutescheme.feature @@ -64,15 +64,18 @@ Feature: Special qute:// pages Then qute://help/quickstart.html should be loaded Scenario: Opening a link with qute://help/index.html/.. - When I open qute://help/index.html/.. without waiting + When the documentation is up to date + And I open qute://help/index.html/.. without waiting Then qute://help/ should be loaded Scenario: Opening a link with qute://help/index.html/../ - When I open qute://help/index.html/../ without waiting + When the documentation is up to date + And I open qute://help/index.html/../ without waiting Then qute://help/ should be loaded - Scenario: Opening a link with qute://help/img/cheatsheet-big.png/.. - When I open qute://help/img/cheatsheet-big.png/.. without waiting + Scenario: Opening a link with qute://help/img/ + When the documentation is up to date + And I open qute://help/img/ without waiting Then "OSError while handling qute://* URL" should be logged And "* url='qute://help/img'* LoadStatus.error" should be logged