def METHOD_NAME(self):
    patterns = ['foo', 'bar', 'bat']
    for i in range(10):
        for p in patterns:
            self.admin.assert_icommand(['itouch', p + str(i)])
    for i in patterns:
        i_star = i + '*'
        positive_space = [r'\b{}\b'.format(i+str(n)) for n in range(10)]
        negative_space = [r'\b{}\b'.format(P+str(n)) for n in range(10) for P in set(patterns) - {i}]
        self.admin.assert_icommand(["itree", "-P", i_star], "STDOUT_MULTILINE", positive_space, use_regex = True)
        self.admin.assert_icommand(["itree", "-I", i_star], "STDOUT_MULTILINE", negative_space, use_regex = True)
    for i in patterns:
        i_dot_star = i + '.*'
        positive_space = [r'\b{}\b'.format(i+str(n)) for n in range(10)]
        negative_space = [r'\b{}\b'.format(P+str(n)) for n in range(10) for P in set(patterns) - {i}]
        self.admin.assert_icommand(["itree", "--pattern-regex", i_dot_star], "STDOUT_MULTILINE", positive_space, use_regex = True)
        self.admin.assert_icommand(["itree", "--ignore-regex", i_dot_star], "STDOUT_MULTILINE", negative_space, use_regex = True)