code: def test_project_discover_exclude_patterns(rootdir):
      project = Project(rootdir / "test-root", [".txt"])
  
      # exclude_paths option
      assert (
          project.discover(["subdir/*"]) == DOCNAMES - SUBDIR_DOCNAMES
      )
      assert (
          project.discover([".txt", "subdir/*"])
          == DOCNAMES - SUBDIR_DOCNAMES
      )
  
file_path: sphinx/tests/test_project.py
imports: import pytest
  from sphinx.project import Project
label_desc: Use image node_id 2 for calling a global function with example usage: test_project_discover_exclude_patterns(rootdir) without return types