          with open(self.PO_FILE, 'r') as fp:
              po_contents = fp.read()
              self.assertMsgId('This literal should be included.', po_contents)
              self.assertNotMsgId('This should be ignored.', po_contents)
  
  
  class SymlinkExtractorTests(ExtractorTests):
  
 
</s> remove             ignore_patterns=[pattern1], stdout=stdout)
 </s> add             ignore_patterns=ignore_patterns, stdout=stdout) </s> remove             for pattern in ignore_patterns:
                if fnmatch.fnmatchcase(path, pattern):
                    return True
            return False
 </s> add             filename = os.path.basename(path)
            ignore = lambda pattern: fnmatch.fnmatchcase(filename, pattern)
            return any(ignore(pattern) for pattern in ignore_patterns) </s> remove         pattern1 = os.path.join('ignore_dir', '*')
 </s> add         ignore_patterns = [
            os.path.join('ignore_dir', '*'),
            'xxx_*',
        ]
            self.assertNotMsgId('This should be ignored too.', po_contents)
          with open(self.PO_FILE, 'r') as fp:
              po_contents = fp.read()
              self.assertMsgId('This literal should be included.', po_contents)
              self.assertNotMsgId('This should be ignored.', po_contents)
            self.assertNotMsgId('This should be ignored too.', po_contents)
  
  
  class SymlinkExtractorTests(ExtractorTests):
  
keep keep keep add keep keep keep keep
 Fixed #20422 -- Applied makemessage's --ignore patterns to full path

Fix makemessage's --ignore patterns being applied to the full path
instead of the file name. Thanks to nnseva for the report and the
original patch. 
tests/i18n/commands/extraction.py