Skip to content

Commit

Permalink
Fix pytest deprecation
Browse files Browse the repository at this point in the history
  • Loading branch information
brandonwillard committed Aug 28, 2024
1 parent 90f0d9f commit 1d985d2
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion tests/test_config.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
import configparser as stdlib_configparser
import io
import pickle
import warnings

import pytest

Expand All @@ -20,7 +21,8 @@ def _create_test_config():

def test_api_deprecation_warning():
# accessing through configdefaults.config is the new best practice
with pytest.warns(None):
with warnings.catch_warnings():
warnings.simplefilter("error")
root = configdefaults.config
assert isinstance(str(root), str)

Expand Down

0 comments on commit 1d985d2

Please # to comment.