1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37
|
From: Ole Streicher <olebole@debian.org>
Date: Wed, 13 Apr 2022 11:29:44 +0200
Subject: Ignore deprecation warnings
Closes: #1009386
---
conftest.py | 4 ++++
yt/tests/test_load_errors.py | 1 +
2 files changed, 5 insertions(+)
diff --git a/conftest.py b/conftest.py
index bf8e291..9f4ecdb 100644
--- a/conftest.py
+++ b/conftest.py
@@ -113,6 +113,10 @@ def pytest_configure(config):
# It is not clear at the time of writing how to approach this,
# so I'm going to ignore this class of warnings altogether for now.
"ignore:unclosed file.*:ResourceWarning",
+ # Ignore all deprecation warnings: They are useful for the developer
+ # as an early warning, but they are not useful for an installed
+ # package
+ "ignore::DeprecationWarning",
):
config.addinivalue_line("filterwarnings", value)
diff --git a/yt/tests/test_load_errors.py b/yt/tests/test_load_errors.py
index 61825cd..a4836a5 100644
--- a/yt/tests/test_load_errors.py
+++ b/yt/tests/test_load_errors.py
@@ -198,6 +198,7 @@ def catchall_dataset_class():
output_type_registry.pop("MockDataset")
+@pytest.mark.skip(reason="Deprecation warnings are disabled")
@pytest.mark.usefixtures("catchall_dataset_class")
def test_depr_load_keyword(tmp_path):
with pytest.deprecated_call(
|