Strip whitespace from markers in INI config#2867
Conversation
RonnyPfannschmidt
left a comment
There was a problem hiding this comment.
given the simplicity of the solution it seems ok to go for a bugfix
CC @nicoddemus
nicoddemus
left a comment
There was a problem hiding this comment.
Thanks! Please add a CHANGELOG entry and we can merge this. 👍
| _fixtureinfo attribute (e.g. doctests) (`#2788 | ||
| <https://github.com/pytest-dev/pytest/issues/2788>`_) | ||
|
|
||
| - Strip whitespace from the markers in INI config (`#2856 |
There was a problem hiding this comment.
We use towncrier for changelog management to avoid conflicts, so instead of this please create a file changelog/2856.bugfix with this text:
Strip whitespace from marker names when reading them from INI config.
There was a problem hiding this comment.
Oh, sorry! I should have paid more attention.
bbb7635 to
52aadcd
Compare
|
For consistency, do you also have to update this section? Although I haven't looked into why this one does not split on |
|
@bilderbuchi I guess |
|
For what it's worth, this change causes pytest to break in a non obvious way when there's a line without a colon, for example if the description of a marker was wrapped such as: |
|
@pquentin I reverted the merge, but this doesn't work: def test_markers_option(testdir):
testdir.makeini("""
[pytest]
markers =
a1: this is a webtest marker
a1some: another marker
a1multi: another marker
with stuff
""")
result = testdir.runpytest("--markers", )
result.stdout.fnmatch_lines([
"*a1*this is a webtest*",
"*a1some*another marker",
"*a1multi*another marker*with stuff",
]) |
|
@pquentin could you please open an issue describing the problem, including the error message you are getting? We can continue this discussion from there then. Thanks! |
Attempts to resolve #2856.