diff options
author | Sviatoslav Abakumov <abakumov.sviatoslav@progforce.com> | 2017-10-24 11:17:01 +0300 |
---|---|---|
committer | Sviatoslav Abakumov <abakumov.sviatoslav@progforce.com> | 2017-10-24 14:18:39 +0300 |
commit | 52aadcd7c126f05a7219db88ac8d3d233b3de5c3 (patch) | |
tree | 063b1876ee7e9d6e8cc318355c9ae282f1980a63 /testing | |
parent | 4cb60dac3d7f8b5295d029eaf6ab061bc5e700e7 (diff) | |
download | pytest-52aadcd7c126f05a7219db88ac8d3d233b3de5c3.tar.gz |
Strip whitespace from markers in INI config
Resolves #2856.
Diffstat (limited to 'testing')
-rw-r--r-- | testing/test_mark.py | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/testing/test_mark.py b/testing/test_mark.py index dc51bbac0..9ae88a665 100644 --- a/testing/test_mark.py +++ b/testing/test_mark.py @@ -169,6 +169,23 @@ def test_markers_option(testdir): ]) +def test_ini_markers_whitespace(testdir): + testdir.makeini(""" + [pytest] + markers = + a1 : this is a whitespace marker + """) + testdir.makepyfile(""" + import pytest + + @pytest.mark.a1 + def test_markers(): + assert True + """) + rec = testdir.inline_run("--strict", "-m", "a1") + rec.assertoutcome(passed=1) + + def test_markers_option_with_plugin_in_current_dir(testdir): testdir.makeconftest('pytest_plugins = "flip_flop"') testdir.makepyfile(flip_flop="""\ |