def shell_dependent(exclude=None):
def decorator(func):<EOL><INDENT>@functools.wraps(func)<EOL>def wrapper(self, *args, **kwargs):<EOL><INDENT>shells = get_shell_types()<EOL>only_shell = os.getenv("<STR_LIT>")<EOL>if only_shell:<EOL><INDENT>shells = [only_shell]<EOL><DEDENT>for shell in shells:<EOL><INDENT>if exclude and shell in exclude:<EOL><INDENT>self.skipTest("<STR_LIT>" % shell)<EOL><DEDENT>print("<STR_LIT>" % shell)<EOL>config.override("<STR_LIT>", shell)<EOL>func(self, *args, **kwargs)<EOL><DEDENT><DEDENT>return wrapper<EOL><DEDENT>return decorator<EOL>
Function decorator that runs the function over all shell types.