From 8dd7f080f4df317d666d9193d8da75090554ce43 Mon Sep 17 00:00:00 2001 From: Florian Bruhin Date: Tue, 12 Jan 2016 22:49:54 +0100 Subject: [PATCH] tests: Default to 5s timeout if not on CI. --- tests/integration/quteprocess.py | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/tests/integration/quteprocess.py b/tests/integration/quteprocess.py index 2d710b1f1..011a69cec 100644 --- a/tests/integration/quteprocess.py +++ b/tests/integration/quteprocess.py @@ -19,6 +19,7 @@ """Fixtures to run qutebrowser in a QProcess and communicate.""" +import os import re import sys import time @@ -288,8 +289,14 @@ class QuteProc(testprocess.Process): line.expected = True def wait_for_load_finished(self, path, *, port=None, https=False, - timeout=15000): + timeout=None): """Wait until any tab has finished loading.""" + if timeout is None: + if 'CI' in os.environ: + timeout = 15000 + else: + timeout = 5000 + url = self.path_to_url(path, port=port, https=https) # We really need the same representation that the webview uses in its # __repr__