From 3d1c83677c8151fa151822473a1021d783cf6daf Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Miro=20Hron=C4=8Dok?= Date: Fri, 19 Apr 2019 14:32:24 +0200 Subject: [PATCH] Support Pytest 4, config.warn is no more https://docs.pytest.org/en/latest/deprecations.html#config-warn-and-node-warn --- tests/benchmarks/conftest.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/tests/benchmarks/conftest.py b/tests/benchmarks/conftest.py index d08442e9f..6fc1c9ebd 100644 --- a/tests/benchmarks/conftest.py +++ b/tests/benchmarks/conftest.py @@ -2,6 +2,7 @@ # Uranium is released under the terms of the LGPLv3 or higher. import pytest +import warnings warn = True @@ -12,7 +13,7 @@ def pytest_ignore_collect(path, config): else: global warn if warn: - config.warn("", "Skipping benchmarks because pytest-benchmark plugin was not found.", "tests/benchmarks/conftest.py") + warnings.warn(pytest.PytestWarning("Skipping benchmarks because pytest-benchmark plugin was not found.")) warn = False return True