From 9a31fbf99523fa1378c4b8d6f4a4ef27e9758dabf64a22c4a503de14ffc037f3 Mon Sep 17 00:00:00 2001 From: Matej Cepl Date: Sat, 8 Jan 2022 23:33:22 +0000 Subject: [PATCH] Accepting request 944473 from home:bnavigator:branches:devel:languages:python - Register obs hypothesis profile for slow test executions OBS-URL: https://build.opensuse.org/request/show/944473 OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-mitmproxy?expand=0&rev=9 --- python-mitmproxy.changes | 5 +++++ python-mitmproxy.spec | 16 ++++++++++++++-- 2 files changed, 19 insertions(+), 2 deletions(-) diff --git a/python-mitmproxy.changes b/python-mitmproxy.changes index 8f2bdc5..d38ae0f 100644 --- a/python-mitmproxy.changes +++ b/python-mitmproxy.changes @@ -1,3 +1,8 @@ +------------------------------------------------------------------- +Thu Jan 6 13:33:12 UTC 2022 - Ben Greiner + +- Register obs hypothesis profile for slow test executions + ------------------------------------------------------------------- Wed Dec 8 21:07:48 UTC 2021 - Ferdinand Thiessen diff --git a/python-mitmproxy.spec b/python-mitmproxy.spec index 99c0d81..ccc145d 100644 --- a/python-mitmproxy.spec +++ b/python-mitmproxy.spec @@ -1,7 +1,7 @@ # # spec file for package python-mitmproxy # -# Copyright (c) 2021 SUSE LLC +# Copyright (c) 2022 SUSE LLC # # All modifications and additions to the file contributed by third parties # remain the property of their copyright owners, unless otherwise agreed @@ -106,6 +106,18 @@ sed -i '1 {\@^#!/usr/bin/env@ d}' mitmproxy/utils/emoji.py sed -i 's/,\s*<.*"/"/g' setup.py rm mitmproxy/contrib/kaitaistruct/make.sh +sed -i 's/--color=yes//' setup.cfg + +echo " +# increase test deadline for slow obs executions +import hypothesis +hypothesis.settings.register_profile( + 'obs', + deadline=5000, + suppress_health_check=[hypothesis.HealthCheck.too_slow] +) +" >> test/conftest.py + %build %python_build @@ -120,7 +132,7 @@ rm mitmproxy/contrib/kaitaistruct/make.sh # test_refresh fails on i586... wrong timestamp type, maybe? # test_rollback and test_output[None-expected_out0-expected_err0] just randomly fail on i586 # test_get_version fails to mock updated git version -%pytest -k "not (test_refresh or test_rollback or test_output or test_get_version)" +%pytest -k "not (test_refresh or test_rollback or test_output or test_get_version)" --hypothesis-profile="obs" %post %python_install_alternative mitmdump