summaryrefslogtreecommitdiff
path: root/tests/end2end/features/test_history_bdd.py
diff options
context:
space:
mode:
authorFlorian Bruhin <git@the-compiler.org>2017-09-17 10:58:30 +0200
committerFlorian Bruhin <git@the-compiler.org>2017-09-17 10:58:30 +0200
commitf85f4630ff4cc1d0eb4f2cf543a674a5e66683d1 (patch)
tree2add37b2b4f9d2692f7e104f4813d9e0fb3fe3a9 /tests/end2end/features/test_history_bdd.py
parentf6d878f33f863753a8729c72fdb14eed5b7ea667 (diff)
downloadqutebrowser-f85f4630ff4cc1d0eb4f2cf543a674a5e66683d1.tar.gz
qutebrowser-f85f4630ff4cc1d0eb4f2cf543a674a5e66683d1.zip
Turn off SQL history writing during end2end tests
This hopefully makes them a bit faster, and also should help with weird hangs we had in tests.
Diffstat (limited to 'tests/end2end/features/test_history_bdd.py')
-rw-r--r--tests/end2end/features/test_history_bdd.py8
1 files changed, 8 insertions, 0 deletions
diff --git a/tests/end2end/features/test_history_bdd.py b/tests/end2end/features/test_history_bdd.py
index 319e36aee..e4bfbd9e2 100644
--- a/tests/end2end/features/test_history_bdd.py
+++ b/tests/end2end/features/test_history_bdd.py
@@ -20,11 +20,19 @@
import logging
import re
+import pytest
import pytest_bdd as bdd
bdd.scenarios('history.feature')
+@pytest.fixture(autouse=True)
+def turn_on_sql_history(quteproc):
+ """Make sure SQL writing is enabled for tests in this module."""
+ quteproc.send_cmd(":debug-pyeval objreg.get('args').debug_flags.remove('no-sql-history')")
+ quteproc.wait_for_load_finished_url('qute://pyeval')
+
+
@bdd.then(bdd.parsers.parse("the history should contain:\n{expected}"))
def check_history(quteproc, httpbin, tmpdir, expected):
path = tmpdir / 'history'