Add marker for #2478

This commit is contained in:
Florian Bruhin 2017-03-29 07:56:07 +02:00
parent 5a16133685
commit e28eabe5eb
3 changed files with 6 additions and 2 deletions

View File

@ -24,6 +24,7 @@ markers =
js_prompt: Tests needing to display a javascript prompt
this: Used to mark tests during development
no_invalid_lines: Don't fail on unparseable lines in end2end tests
issue2478: Tests which are broken on Windows with QtWebEngine, https://github.com/qutebrowser/qutebrowser/issues/2478
qt_log_level_fail = WARNING
qt_log_ignore =
^SpellCheck: .*

View File

@ -44,7 +44,7 @@ hypothesis.settings.register_profile('default',
hypothesis.settings.load_profile('default')
def _apply_platform_markers(item):
def _apply_platform_markers(config, item):
"""Apply a skip marker to a given item."""
markers = [
('posix', os.name != 'posix', "Requires a POSIX os"),
@ -57,6 +57,8 @@ def _apply_platform_markers(item):
('frozen', not getattr(sys, 'frozen', False),
"Can only run when frozen"),
('ci', 'CI' not in os.environ, "Only runs on CI."),
('issue2478', os.name == 'nt' and config.webengine,
"Broken with QtWebEngine on Windows"),
]
for searched_marker, condition, default_reason in markers:
@ -117,7 +119,7 @@ def pytest_collection_modifyitems(config, items):
if module_root_dir == 'end2end':
item.add_marker(pytest.mark.end2end)
_apply_platform_markers(item)
_apply_platform_markers(config, item)
if item.get_marker('xfail_norun'):
item.add_marker(pytest.mark.xfail(run=False))
if item.get_marker('js_prompt'):

View File

@ -419,6 +419,7 @@ Feature: Downloading things from a website.
## opening a file directly (prompt-open-download)
@issue2478
Scenario: Opening a download directly
When I set storage -> prompt-download-directory to true
And I open data/downloads/download.bin without waiting