Skip to content

Commit

Permalink
Merge pull request #2581 from cta-observatory/deprecation_warnings
Browse files Browse the repository at this point in the history
Treat deprecation warnings as errors
  • Loading branch information
maxnoe authored Jul 10, 2024
2 parents a0b2d89 + c3c7b26 commit 3dafbc2
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 0 deletions.
1 change: 1 addition & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -138,6 +138,7 @@ astropy_header = true
addopts = ["-ra", "--strict-config", "--strict-markers"]

filterwarnings = [
"error::DeprecationWarning",
"error::astropy.utils.exceptions.AstropyDeprecationWarning",
"error::ctapipe.utils.deprecation.CTAPipeDeprecationWarning",
"error::ctapipe.instrument.FromNameWarning",
Expand Down
4 changes: 4 additions & 0 deletions src/ctapipe/tools/tests/test_tools.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
import sys

import matplotlib as mpl
import matplotlib.pyplot as plt

# pylint: disable=C0103,C0116,C0415
import pytest
Expand All @@ -22,6 +23,9 @@
def test_display_dl1(tmp_path, dl1_image_file, dl1_parameters_file):
from ctapipe.tools.display_dl1 import DisplayDL1Calib

# close all figures before switching mpl backends
# fixes a deprecation warning / pending error in newer mpl versions
plt.close("all")
mpl.use("Agg")

# test simtel
Expand Down

0 comments on commit 3dafbc2

Please sign in to comment.