tests: Add @qtwebengine_todo marker

This commit is contained in:
Florian Bruhin 2016-08-18 13:05:37 +02:00
parent 1ec59f3f0e
commit e10b7ba8ab
3 changed files with 16 additions and 0 deletions

View File

@ -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: .*

View File

@ -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."""

View File

@ -17,10 +17,14 @@
# You should have received a copy of the GNU General Public License
# along with qutebrowser. If not, see <http://www.gnu.org/licenses/>.
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')