def _extract_and_set_shell_commands_from(self, string): if not hasattr(self, "_shell"): self._shell_signature = ShellCommandSignature() command = self._shell_signature.get_matches_in_string(string) if command != "" and command not in self._shell_commands: self._shell_commands.append(command)
def setUpClass(cls): cls.shell = ShellCommandSignature()