diff --git a/_pytest/mark.py b/_pytest/mark.py index c3352b387..e5d956252 100644 --- a/_pytest/mark.py +++ b/_pytest/mark.py @@ -293,7 +293,7 @@ def pytest_configure(config): if config.option.strict: MARK_GEN._config = config - empty_parameterset = config.getini("empty_parameterset") + empty_parameterset = config.getini("empty_parameter_set_mark") if empty_parameterset not in ('skip', 'xfail', None, ''): from pytest import UsageError diff --git a/testing/test_mark.py b/testing/test_mark.py index c85a30b41..c3a80083c 100644 --- a/testing/test_mark.py +++ b/testing/test_mark.py @@ -893,16 +893,16 @@ class TestMarkDecorator(object): assert (lhs == rhs) == expected -@pytest.mark.parametrize('mark', [None, 'skip', 'xfail']) +@pytest.mark.parametrize('mark', [None, '', 'skip', 'xfail']) def test_parameterset_for_parametrize_marks(testdir, mark): if mark is not None: - testdir.makeini("[pytest]\nempty_parameterset=" + mark) + testdir.makeini("[pytest]\nempty_parameter_set_mark=" + mark) config = testdir.parseconfig() from _pytest.mark import pytest_configure, get_empty_parameterset_mark pytest_configure(config) result_mark = get_empty_parameterset_mark(config, ['a'], all) - if mark is None: + if mark in (None, ''): # normalize to the requested name mark = 'skip' assert result_mark.name == mark