summaryrefslogtreecommitdiff
path: root/tests/end2end/conftest.py
diff options
context:
space:
mode:
authorFlorian Bruhin <git@the-compiler.org>2018-02-28 08:08:23 +0100
committerFlorian Bruhin <git@the-compiler.org>2018-02-28 08:08:23 +0100
commitf3aaa1084a382296019ee79b479286d45a45a8e5 (patch)
tree799cf5a58f976f1d94d161706b90a1ef03933fb6 /tests/end2end/conftest.py
parent824825e67da44a0eab49182db6efd5423a8aa8b0 (diff)
downloadqutebrowser-f3aaa1084a382296019ee79b479286d45a45a8e5.tar.gz
qutebrowser-f3aaa1084a382296019ee79b479286d45a45a8e5.zip
Migrate spell tests to unittests
Diffstat (limited to 'tests/end2end/conftest.py')
-rw-r--r--tests/end2end/conftest.py23
1 files changed, 1 insertions, 22 deletions
diff --git a/tests/end2end/conftest.py b/tests/end2end/conftest.py
index d3d34097b..5226396a3 100644
--- a/tests/end2end/conftest.py
+++ b/tests/end2end/conftest.py
@@ -118,27 +118,6 @@ def _get_backend_tag(tag):
return pytest_marks[name](desc)
-def _get_dictionary_tag(tag):
- """Handle tags like must_have_dict=en-US for BDD tests."""
- dict_re = re.compile(r"""
- (?P<event>must_have_dict|cannot_have_dict)=(?P<dict>[a-z]{2}-[A-Z]{2})
- """, re.VERBOSE)
-
- match = dict_re.fullmatch(tag)
- if not match:
- return None
-
- event = match.group('event')
- dictionary = match.group('dict')
- has_dict = spell.local_filename(dictionary) is not None
- if event == 'must_have_dict':
- return pytest.mark.skipif(not has_dict, reason=tag)
- elif event == 'cannot_have_dict':
- return pytest.mark.skipif(has_dict, reason=tag)
- else:
- return None
-
-
if not getattr(sys, 'frozen', False):
def pytest_bdd_apply_tag(tag, function):
"""Handle custom tags for BDD tests.
@@ -146,7 +125,7 @@ if not getattr(sys, 'frozen', False):
This tries various functions, and if none knows how to handle this tag,
it returns None so it falls back to pytest-bdd's implementation.
"""
- funcs = [_get_version_tag, _get_backend_tag, _get_dictionary_tag]
+ funcs = [_get_version_tag, _get_backend_tag]
for func in funcs:
mark = func(tag)
if mark is not None: