summaryrefslogtreecommitdiff
path: root/tests/unit/browser/test_caret.py
diff options
context:
space:
mode:
authorFlorian Bruhin <me@the-compiler.org>2018-09-13 22:29:38 +0200
committerFlorian Bruhin <me@the-compiler.org>2018-09-13 22:32:00 +0200
commit62458c7a841666e19ccbf7ae434038795eba6671 (patch)
tree0e51a7ce781cffa8f02d6ca74f01ce6fc95b7d8b /tests/unit/browser/test_caret.py
parent88cbc9bb12e8a61b41c50b9e1bb2ecb5b7126471 (diff)
downloadqutebrowser-62458c7a841666e19ccbf7ae434038795eba6671.tar.gz
qutebrowser-62458c7a841666e19ccbf7ae434038795eba6671.zip
Register a qute://testdata/ scheme for unit tests
This is more lightweight than running a webserver (probably about the same as file://), but allows us to use relative links in files.
Diffstat (limited to 'tests/unit/browser/test_caret.py')
-rw-r--r--tests/unit/browser/test_caret.py3
1 files changed, 1 insertions, 2 deletions
diff --git a/tests/unit/browser/test_caret.py b/tests/unit/browser/test_caret.py
index 0fd434a77..0864a9947 100644
--- a/tests/unit/browser/test_caret.py
+++ b/tests/unit/browser/test_caret.py
@@ -31,9 +31,8 @@ from helpers import utils
@pytest.fixture
def caret(web_tab, qtbot, mode_manager):
- path = os.path.join(utils.abs_datapath(), 'caret.html')
with qtbot.wait_signal(web_tab.load_finished):
- web_tab.openurl(QUrl.fromLocalFile(path))
+ web_tab.openurl(QUrl('qute://testdata/data/caret.html'))
mode_manager.enter(usertypes.KeyMode.caret)