scons icon indicating copy to clipboard operation
scons copied to clipboard

Fix bug with unique adds and delete_existing

Open mwichmann opened this issue 1 year ago • 0 comments

AppendUnique and PrependUnique, when called with delete_existing true, had a small logic flaw: it might remove an existing value if the value to be added s a scalar (string, most likely) and there was a substring match. The code needs to do an equality test, not a membership test.

Docstrings and unit tests updated, plus dropped a duplicate definition of reserved_variables in the test.

Contributor Checklist:

  • [X] I have created a new test or updated the unit tests to cover the new/changed functionality.
  • [X] I have updated CHANGES.txt (and read the README.rst)
  • [X] I have updated the appropriate documentation

mwichmann avatar Aug 19 '24 15:08 mwichmann