Closed John2202W closed 1 year ago
I don't anticipate this being a problem, but I occurred to me that you can't prevent a substring matching. For example if we had two devices, "abc" and "abcd", and you really wanted to only open "abc", not "abcd" there is no way to specify that. I can't imagine a realistic scenario where that would come up.
Could use fnmatch to add wildcard matching or a regex if we need to.
Have changed to regex to give more flexibility if/when needed. Still up to the test-script author to prevent unwanted substrings
e.g ftdi.open(r"abc\-?\d? Some Description$")
What about using re.fullmatch
instead of re.match
? With that the existing behavior of strict matching will be maintained, but allows more flexible matching going forward.
Updated ^
Looks good to me
Looks good. I can merge once the conflict on the release notes in resolved from the merge of PR #169
Add logging of FTDI instruments. Allow substring matching to the ftdi description. (more details - CPE2543)