diff --git a/pytest.ini b/pytest.ini index 8e40d165a..3c63d16f9 100644 --- a/pytest.ini +++ b/pytest.ini @@ -15,6 +15,7 @@ markers = xfail_norun: xfail the test with out running it ci: Tests which should only run on CI. flaky_once: Try to rerun this test once if it fails + qtwebengine_todo: Features still missing with QtWebEngine qt_log_level_fail = WARNING qt_log_ignore = ^SpellCheck: .* diff --git a/tests/end2end/features/conftest.py b/tests/end2end/features/conftest.py index dd4621930..4211b0f48 100644 --- a/tests/end2end/features/conftest.py +++ b/tests/end2end/features/conftest.py @@ -35,6 +35,17 @@ from qutebrowser.utils import log from helpers import utils +def pytest_collection_modifyitems(config, items): + """Apply @qtwebengine_* markers""" + webengine = config.getoption('--qute-bdd-webengine') + + for item in items: + marker = item.get_marker('qtwebengine_todo') + if marker: + text = 'QtWebEngine TODO: {}'.format(marker.args[0]) + item.add_marker(pytest.mark.skipif(webengine, reason=text)) + + @pytest.hookimpl(hookwrapper=True) def pytest_runtest_makereport(item, call): """Add a BDD section to the test output.""" diff --git a/tests/end2end/features/test_caret_bdd.py b/tests/end2end/features/test_caret_bdd.py index 611e00610..56dabdd72 100644 --- a/tests/end2end/features/test_caret_bdd.py +++ b/tests/end2end/features/test_caret_bdd.py @@ -17,10 +17,14 @@ # You should have received a copy of the GNU General Public License # along with qutebrowser. If not, see . +import pytest import pytest_bdd as bdd # pylint: disable=unused-import from end2end.features.test_yankpaste_bdd import init_fake_clipboard +pytestmark = pytest.mark.qtwebengine_todo("Caret mode is not implemented") + + bdd.scenarios('caret.feature')