code: def test_exclude_pattern(self):
      # return False if no match
      file_list = FileList()
      self.assertFalse(file_list.exclude_pattern("*.py"))
  
      # return True if files match
      file_list = FileList()
      file_list.files = ["a.py", "b.py"]
      self.assertTrue(file_list.exclude_pattern("*.py"))
  
      # test excludes
      file_list = FileList()
      file_list.files = ["a.py", "a.txt"]
      file_list.exclude_pattern("*.py")
      self.assertEqual(file_list.files, ["a.txt"])
  
imports: import os
  import re
  import unittest
  from distutils import debug
  from distutils.log import WARN
  from distutils.errors import DistutilsTemplateError
  from distutils.filelist import glob_to_re, translate_pattern, FileList
  from test.test_support import captured_stdout, run_unittest
  from distutils.tests import support
label_desc: Use image node_id 9 for calling the FileListTestCase obj's underlying member method code with example usage: obj.test_exclude_pattern() without return types