redhat-qe-security / SCAutolib

Library for automation of smart card testing
GNU General Public License v3.0
3 stars 10 forks source link

Add type checks for reject and expect parameters (or convert string to single element list) #24

Closed mahavrila closed 2 years ago

mahavrila commented 2 years ago

check_output expects that reject and expect parameters are lists of strings. In case user mistakenly provides string instead of list check_output does not notice it and behaves unexpectedly. check_output should check the type of the variables and raise an exception in case variables have unexpected types.

Another user-friendly solution: check_output accepts both - strings and lists of strings and if it gets string, it transform it to single element list.