diff options
author | Anderson Bravalheri <andersonbravalheri@gmail.com> | 2023-03-07 18:21:48 +0000 |
---|---|---|
committer | Anderson Bravalheri <andersonbravalheri@gmail.com> | 2023-03-07 21:48:38 +0000 |
commit | 529efe7bc944202f19fec1f406958f1485e4056a (patch) | |
tree | 4a56ea11bd84380e2cd0595f90faef5d1d3cc48c | |
parent | 7fd2e7450b8b9bc4e9a5b04ea43b558bedd03517 (diff) | |
download | python-setuptools-git-529efe7bc944202f19fec1f406958f1485e4056a.tar.gz |
Enforce deprecation warnings in setuptools test suite
-rw-r--r-- | setuptools/tests/test_warnings.py | 3 | ||||
-rw-r--r-- | tox.ini | 1 |
2 files changed, 3 insertions, 1 deletions
diff --git a/setuptools/tests/test_warnings.py b/setuptools/tests/test_warnings.py index 75e468d2..013e2526 100644 --- a/setuptools/tests/test_warnings.py +++ b/setuptools/tests/test_warnings.py @@ -60,7 +60,7 @@ _EXAMPLES = { @pytest.mark.parametrize("example_name", _EXAMPLES.keys()) -def test_formatting(example_name): +def test_formatting(monkeypatch, example_name): """ It should automatically handle indentation, interpolation and things like due date. """ @@ -68,6 +68,7 @@ def test_formatting(example_name): kwargs = _EXAMPLES[example_name]["kwargs"] expected = _EXAMPLES[example_name]["expected"] + monkeypatch.setenv("SETUPTOOLS_ENFORCE_DEPRECATION", "false") with pytest.warns(SetuptoolsWarning) as warn_info: SetuptoolsWarning.emit(*args, **kwargs) assert _get_message(warn_info) == cleandoc(expected) @@ -10,6 +10,7 @@ deps = # Ideally all the dependencies should be set as "extras" setenv = PYTHONWARNDEFAULTENCODING = 1 + SETUPTOOLS_ENFORCE_DEPRECATION = 1 commands = pytest {posargs} usedevelop = True |