Merge pull request #6215 from blueyed/cleanup-exc

_idval: remove trailing newline from exception
This commit is contained in:
Daniel Hahler 2019-11-24 20:29:46 +01:00 committed by GitHub
commit d7d5cf4136
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 2 deletions

View File

@ -1202,8 +1202,7 @@ def _idval(val, argname, idx, idfn, item, config):
if generated_id is not None:
val = generated_id
except Exception as e:
# See issue https://github.com/pytest-dev/pytest/issues/2169
msg = "{}: error raised while trying to determine id of parameter '{}' at position {}\n"
msg = "{}: error raised while trying to determine id of parameter '{}' at position {}"
msg = msg.format(item.nodeid, argname, idx)
raise ValueError(msg) from e
elif config: