From a304dbb519aecf56022febe570958a8d64dae555 Mon Sep 17 00:00:00 2001 From: Akiomi Kamakura Date: Tue, 21 May 2019 09:48:22 +0900 Subject: [PATCH] Fix `disable_test_id_escaping_and_forfeit_all_rights_to_community_support` option when using a list of test IDs --- AUTHORS | 1 + changelog/5286.bugfix.rst | 1 + src/_pytest/python.py | 2 +- 3 files changed, 3 insertions(+), 1 deletion(-) create mode 100644 changelog/5286.bugfix.rst diff --git a/AUTHORS b/AUTHORS index 95f763a96..0672d4abf 100644 --- a/AUTHORS +++ b/AUTHORS @@ -9,6 +9,7 @@ Abhijeet Kasurde Adam Johnson Adam Uhlir Ahn Ki-Wook +Akiomi Kamakura Alan Velasco Alexander Johnson Alexei Kozlenok diff --git a/changelog/5286.bugfix.rst b/changelog/5286.bugfix.rst new file mode 100644 index 000000000..1d6974b89 --- /dev/null +++ b/changelog/5286.bugfix.rst @@ -0,0 +1 @@ +Fix issue with ``disable_test_id_escaping_and_forfeit_all_rights_to_community_support`` option doesn't work when using a list of test IDs in parametrized tests. diff --git a/src/_pytest/python.py b/src/_pytest/python.py index 18d909855..b3754a2c2 100644 --- a/src/_pytest/python.py +++ b/src/_pytest/python.py @@ -1217,7 +1217,7 @@ def _idvalset(idx, parameterset, argnames, idfn, ids, item, config): ] return "-".join(this_id) else: - return ascii_escaped(ids[idx]) + return _ascii_escaped_by_config(ids[idx], config) def idmaker(argnames, parametersets, idfn=None, ids=None, config=None, item=None):