From e28eabe5eb35da82fa9b0f684a6bebf1f9dfce34 Mon Sep 17 00:00:00 2001 From: Florian Bruhin Date: Wed, 29 Mar 2017 07:56:07 +0200 Subject: [PATCH] Add marker for #2478 --- pytest.ini | 1 + tests/conftest.py | 6 ++++-- tests/end2end/features/downloads.feature | 1 + 3 files changed, 6 insertions(+), 2 deletions(-) diff --git a/pytest.ini b/pytest.ini index d232716c0..2f7ee1f1b 100644 --- a/pytest.ini +++ b/pytest.ini @@ -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: .* diff --git a/tests/conftest.py b/tests/conftest.py index bcb67924b..fe2ca9042 100644 --- a/tests/conftest.py +++ b/tests/conftest.py @@ -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'): diff --git a/tests/end2end/features/downloads.feature b/tests/end2end/features/downloads.feature index c78416abe..b862f9c74 100644 --- a/tests/end2end/features/downloads.feature +++ b/tests/end2end/features/downloads.feature @@ -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