From a7170fefe952b0a355a5e63995106723acb990c3 Mon Sep 17 00:00:00 2001 From: Florian Bruhin Date: Sun, 22 Jul 2018 10:04:42 +0200 Subject: [PATCH] Turn off hypothesis deadline if on CI --- tests/conftest.py | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/tests/conftest.py b/tests/conftest.py index 595c2940e..7168cd812 100644 --- a/tests/conftest.py +++ b/tests/conftest.py @@ -42,10 +42,15 @@ from qutebrowser.qt import sip import qutebrowser.app # To register commands +ON_CI = 'CI' in os.environ + + # Set hypothesis settings hypothesis.settings.register_profile('default', hypothesis.settings(deadline=600)) -hypothesis.settings.load_profile('default') +hypothesis.settings.register_profile('ci', + hypothesis.settings(deadline=None)) +hypothesis.settings.load_profile('ci' if ON_CI else 'default') def _apply_platform_markers(config, item): @@ -60,8 +65,8 @@ def _apply_platform_markers(config, item): "Can't be run when frozen"), ('frozen', not getattr(sys, 'frozen', False), "Can only run when frozen"), - ('ci', 'CI' not in os.environ, "Only runs on CI."), - ('no_ci', 'CI' in os.environ, "Skipped on CI."), + ('ci', not ON_CI, "Only runs on CI."), + ('no_ci', ON_CI, "Skipped on CI."), ('issue2478', utils.is_windows and config.webengine, "Broken with QtWebEngine on Windows"), ('issue3572',