summaryrefslogtreecommitdiff
path: root/testing/deprecated_test.py
diff options
context:
space:
mode:
authorBruno Oliveira <nicoddemus@gmail.com>2018-12-19 17:43:17 -0200
committerBruno Oliveira <nicoddemus@gmail.com>2018-12-19 17:43:17 -0200
commit91384193794dcf8ae30778767546a2dad7bad845 (patch)
treeb013bdaf365b9f1a42bfbed868c903e6c0c1bb45 /testing/deprecated_test.py
parentc400d8b2d861a9e99ba5af466842b890f1e346ea (diff)
downloadpytest-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.py18
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):