From 4ccfd41ab76a46967db88af2dbdfdde141eccb7f Mon Sep 17 00:00:00 2001 From: Tanya Agarwal Date: Sun, 8 Oct 2023 16:58:17 +0530 Subject: [PATCH] Bug Fix 11456: Duplicated parameters in @pytest.mark.parametrize --- changelog/11456.bugfix.rst | 6 ++++++ 1 file changed, 6 insertions(+) create mode 100644 changelog/11456.bugfix.rst diff --git a/changelog/11456.bugfix.rst b/changelog/11456.bugfix.rst new file mode 100644 index 000000000..a9fefec28 --- /dev/null +++ b/changelog/11456.bugfix.rst @@ -0,0 +1,6 @@ +In this, we propose a solution that ensures the generation of unique identifiers for ParameterSets in the make_unique_parameterset_ids method in Python.py class. It appends numeric suffixes to identifiers, ensuring uniqueness even when the original identifiers have digit endings. +If the id ends in a digit, make then new id f"{id}_{suffix}". If the new id is already in the set of seen ids, increment the suffix number and try again. This is sure to work, and even be fast in practice, because our maximum suffix is the number of duplicate ids we started with. + + + +