code: def test_recurse(self):
      ff = grep.findfiles
      parent = os.path.dirname(self.path)
      grepfile = os.path.join(parent, "grep.py")
      pat = "*.py"
  
      # Get Python files only in parent directory.
      filelist = list(ff(parent, pat, False))
      parent_size = len(filelist)
      # Lots of Python files in idlelib.
      self.assertGreater(parent_size, 20)
      self.assertIn(grepfile, filelist)
      # Without subdirectories, this file isn't returned.
      self.assertNotIn(self.realpath, filelist)
  
      # Include subdirectories.
      filelist = list(ff(parent, pat, True))
      # More files found now.
      self.assertGreater(len(filelist), parent_size)
      self.assertIn(grepfile, filelist)
      # This file exists in list now.
      self.assertIn(self.realpath, filelist)
  
      # Check another level up the tree.
      parent = os.path.dirname(parent)
      filelist = list(ff(parent, "*.py", True))
      self.assertIn(self.realpath, filelist)
  
imports: from idlelib import grep
  import unittest
  from test.support import captured_stdout
  from idlelib.idle_test.mock_tk import Var
  import os
  import re
label_desc: Use image node_id 6 for calling the FindfilesTest obj's underlying member method code with example usage: obj.test_recurse() without return types