discarded unnecessary comment and adjusted some code to make pylint happy, also made adjustments to pytest scenarios
This commit is contained in:
parent
b3b768f4a8
commit
233cea4b62
@ -135,8 +135,8 @@ def data_for_url(url):
|
|||||||
Return:
|
Return:
|
||||||
A (mimetype, data) tuple.
|
A (mimetype, data) tuple.
|
||||||
"""
|
"""
|
||||||
# normalize path and strip redundant trailing slashes
|
norm_url = url.adjusted(QUrl.NormalizePathSegments |
|
||||||
norm_url = url.adjusted(QUrl.NormalizePathSegments | QUrl.StripTrailingSlash)
|
QUrl.StripTrailingSlash)
|
||||||
if norm_url != url:
|
if norm_url != url:
|
||||||
raise Redirect(norm_url)
|
raise Redirect(norm_url)
|
||||||
|
|
||||||
|
@ -23,17 +23,6 @@ Feature: Using :navigate
|
|||||||
And I run :navigate up
|
And I run :navigate up
|
||||||
Then qute://help/ should be loaded
|
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
|
# prev/next
|
||||||
|
|
||||||
Scenario: Navigating to previous page
|
Scenario: Navigating to previous page
|
||||||
|
@ -64,15 +64,18 @@ Feature: Special qute:// pages
|
|||||||
Then qute://help/quickstart.html should be loaded
|
Then qute://help/quickstart.html should be loaded
|
||||||
|
|
||||||
Scenario: Opening a link with qute://help/index.html/..
|
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
|
Then qute://help/ should be loaded
|
||||||
|
|
||||||
Scenario: Opening a link with qute://help/index.html/../
|
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
|
Then qute://help/ should be loaded
|
||||||
|
|
||||||
Scenario: Opening a link with qute://help/img/cheatsheet-big.png/..
|
Scenario: Opening a link with qute://help/img/
|
||||||
When I open qute://help/img/cheatsheet-big.png/.. without waiting
|
When the documentation is up to date
|
||||||
|
And I open qute://help/img/ without waiting
|
||||||
Then "OSError while handling qute://* URL" should be logged
|
Then "OSError while handling qute://* URL" should be logged
|
||||||
And "* url='qute://help/img'* LoadStatus.error" should be logged
|
And "* url='qute://help/img'* LoadStatus.error" should be logged
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user