redhat-qe-security / SCAutolib

Library for automation of smart card testing

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

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

mahavrila opened this issue · comments

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.