diff options
author | Bruno Oliveira <nicoddemus@gmail.com> | 2018-12-19 17:43:17 -0200 |
---|---|---|
committer | Bruno Oliveira <nicoddemus@gmail.com> | 2018-12-19 17:43:17 -0200 |
commit | 91384193794dcf8ae30778767546a2dad7bad845 (patch) | |
tree | b013bdaf365b9f1a42bfbed868c903e6c0c1bb45 /testing/deprecated_test.py | |
parent | c400d8b2d861a9e99ba5af466842b890f1e346ea (diff) | |
download | pytest-91384193794dcf8ae30778767546a2dad7bad845.tar.gz |
Remove support for '[pytest]' section in setup.cfg file
Fix #3086
Diffstat (limited to 'testing/deprecated_test.py')
-rw-r--r-- | testing/deprecated_test.py | 18 |
1 files changed, 6 insertions, 12 deletions
diff --git a/testing/deprecated_test.py b/testing/deprecated_test.py index d392ac7d9..bb2c17c45 100644 --- a/testing/deprecated_test.py +++ b/testing/deprecated_test.py @@ -10,8 +10,7 @@ from _pytest.warnings import SHOW_PYTEST_WARNINGS_ARG pytestmark = pytest.mark.pytester_example_path("deprecated") -@pytest.mark.filterwarnings("default") -def test_pytest_setup_cfg_deprecated(testdir): +def test_pytest_setup_cfg_unsupported(testdir): testdir.makefile( ".cfg", setup=""" @@ -19,14 +18,11 @@ def test_pytest_setup_cfg_deprecated(testdir): addopts = --verbose """, ) - result = testdir.runpytest() - result.stdout.fnmatch_lines( - ["*pytest*section in setup.cfg files is deprecated*use*tool:pytest*instead*"] - ) + with pytest.raises(pytest.fail.Exception): + testdir.runpytest() -@pytest.mark.filterwarnings("default") -def test_pytest_custom_cfg_deprecated(testdir): +def test_pytest_custom_cfg_unsupported(testdir): testdir.makefile( ".cfg", custom=""" @@ -34,10 +30,8 @@ def test_pytest_custom_cfg_deprecated(testdir): addopts = --verbose """, ) - result = testdir.runpytest("-c", "custom.cfg") - result.stdout.fnmatch_lines( - ["*pytest*section in custom.cfg files is deprecated*use*tool:pytest*instead*"] - ) + with pytest.raises(pytest.fail.Exception): + testdir.runpytest("-c", "custom.cfg") def test_getfuncargvalue_is_deprecated(request): |