From d299e48960a8ae608bded9fde504ed3a5994240a Mon Sep 17 00:00:00 2001 From: Florian Bruhin Date: Wed, 24 Oct 2018 09:47:53 +0200 Subject: [PATCH] Work around pytest-bdd issues See https://github.com/ionelmc/pytest-benchmark/issues/124 and https://github.com/ionelmc/pytest-benchmark/issues/125 --- pytest.ini | 2 ++ tests/unit/browser/test_hints.py | 6 ++++-- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/pytest.ini b/pytest.ini index 4d45dad5e..c907173e0 100644 --- a/pytest.ini +++ b/pytest.ini @@ -69,3 +69,5 @@ filterwarnings = error # This happens in many qutebrowser dependencies... ignore:Using or importing the ABCs from 'collections' instead of from 'collections.abc' is deprecated, and in 3.8 it will stop working:DeprecationWarning + # WORKAROUND for https://github.com/ionelmc/pytest-benchmark/issues/124 + ignore:Node\.warn\(code, message\) form has been deprecated, use Node\.warn\(warning_instance\) instead:pytest.PytestDeprecationWarning diff --git a/tests/unit/browser/test_hints.py b/tests/unit/browser/test_hints.py index 9a8a024c9..5c2758d84 100644 --- a/tests/unit/browser/test_hints.py +++ b/tests/unit/browser/test_hints.py @@ -30,8 +30,10 @@ import qutebrowser.browser.hints @pytest.fixture(autouse=True) -def setup(win_registry, mode_manager): - pass +def setup(benchmark, win_registry, mode_manager): + yield + # WORKAROUND for https://github.com/ionelmc/pytest-benchmark/issues/125 + benchmark._mode = 'WORKAROUND' # pylint: disable=protected-access @pytest.fixture