summaryrefslogtreecommitdiff
path: root/tests/end2end/features/test_urlmarks_bdd.py
diff options
context:
space:
mode:
Diffstat (limited to 'tests/end2end/features/test_urlmarks_bdd.py')
-rw-r--r--tests/end2end/features/test_urlmarks_bdd.py28
1 files changed, 13 insertions, 15 deletions
diff --git a/tests/end2end/features/test_urlmarks_bdd.py b/tests/end2end/features/test_urlmarks_bdd.py
index e747e4374..2a7b65d8c 100644
--- a/tests/end2end/features/test_urlmarks_bdd.py
+++ b/tests/end2end/features/test_urlmarks_bdd.py
@@ -1,22 +1,10 @@
-# Copyright 2015-2021 Florian Bruhin (The Compiler) <mail@qutebrowser.org>
+# SPDX-FileCopyrightText: Florian Bruhin (The Compiler) <mail@qutebrowser.org>
#
-# This file is part of qutebrowser.
-#
-# qutebrowser is free software: you can redistribute it and/or modify
-# it under the terms of the GNU General Public License as published by
-# the Free Software Foundation, either version 3 of the License, or
-# (at your option) any later version.
-#
-# qutebrowser is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU General Public License for more details.
-#
-# You should have received a copy of the GNU General Public License
-# along with qutebrowser. If not, see <https://www.gnu.org/licenses/>.
+# SPDX-License-Identifier: GPL-3.0-or-later
import os.path
+import pytest
import pytest_bdd as bdd
from helpers import testutils
@@ -24,6 +12,16 @@ from helpers import testutils
bdd.scenarios('urlmarks.feature')
+@pytest.fixture(autouse=True)
+def clear_marks(quteproc):
+ """Clear all existing marks between tests."""
+ yield
+ quteproc.send_cmd(':quickmark-del --all')
+ quteproc.wait_for(message="Quickmarks cleared.")
+ quteproc.send_cmd(':bookmark-del --all')
+ quteproc.wait_for(message="Bookmarks cleared.")
+
+
def _check_marks(quteproc, quickmarks, expected, contains):
"""Make sure the given line does (not) exist in the bookmarks.