From 52aadcd7c126f05a7219db88ac8d3d233b3de5c3 Mon Sep 17 00:00:00 2001 From: Sviatoslav Abakumov Date: Tue, 24 Oct 2017 11:17:01 +0300 Subject: Strip whitespace from markers in INI config Resolves #2856. --- testing/test_mark.py | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) (limited to 'testing') 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="""\ -- cgit v1.2.3