Exemple #1
0
 def does_match_tags(self, test):
     if self.options is not None:
         tags_pattern = getattr(self.options, 'tags_pattern', None)
         if tags_pattern is not None:
             tags = getattr(test, 'tags', testlib.Tags())
             if tags.inherit and isinstance(test, types.MethodType):
                 tags = tags | getattr(test.im_class, 'tags', testlib.Tags())
             return tags.match(tags_pattern)
     return True # no pattern
Exemple #2
0
 class LintTC(base_class):
     module = module_file.replace('.py', '')
     output = messages_file
     depends = dependencies or None
     tags = testlib.Tags(('generated', 'pylint_input_%s' % module))
     INPUT_DIR = input_dir
     MSG_DIR = msg_dir
class LintTestNonExistentFileTC(LintTestUsingFile):
    module = join(INPUT_DIR, 'nonexistent.py')
    _get_expected = lambda self: 'F:  1: No module named %s\n' % self.module[
        len(getcwd()) + 1:]
    tags = testlib.Tags(('generated', 'pylint_input_%s' % module))

    def test_functionality(self):
        self._test([self.module])
class LintTestNonExistentModuleTC(LintTestUsingModule):
    module = 'nonexistent'
    _get_expected = lambda self: 'F:  1: No module named %snonexistent%s\n' % (
        quote, quote)
    tags = testlib.Tags(('generated', 'pylint_input_%s' % module))
Exemple #5
0
 class LintTestUsingFileTC(LintTestUsingFile):
     module = module_file.replace('.py', '')
     output = messages_file
     depends = dependencies or None
     tags = testlib.Tags(('generated', 'pylint_input_%s' % module))