Skip to content

Commit

Permalink
Testing: Treat warnings as errors rucio#5522
Browse files Browse the repository at this point in the history
There are multiple Warnings (like `DeprecationWarning`s,
`PendingDeprecationWarning`s, `SAWarning`s, ...) in our project. This commit
resolves them.
  • Loading branch information
Joel Dierkes committed May 4, 2022
1 parent b10d485 commit 7692f33
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions lib/rucio/tests/conftest.py
Expand Up @@ -16,6 +16,7 @@
from __future__ import print_function

import traceback
import warnings

import pytest

Expand Down Expand Up @@ -368,3 +369,8 @@ def metrics_mock():
mock.patch('rucio.core.monitor.TIMINGS', new={}), \
mock.patch('prometheus_client.values.ValueClass', new=values.MutexValue):
yield registry


@pytest.fixture(autouse=True)
def treat_warnings_as_exceptions():
warnings.filterwarnings("error")

0 comments on commit 7692f33

Please sign in to comment.