docstr: A directory in package_data should not be added to the filelist.
docstr_tok: ["A","directory","in","package_data","should","not","be","added","to","the","filelist","."]
code: def test_dir_in_package_data(self):
      """
      A directory in package_data should not be added to the filelist.
      """
      # See bug 19286
      sources = self.mkdtemp()
      pkg_dir = os.path.join(sources, "pkg")
  
      os.mkdir(pkg_dir)
      open(os.path.join(pkg_dir, "__init__.py"), "w").close()
  
      docdir = os.path.join(pkg_dir, "doc")
      os.mkdir(docdir)
      open(os.path.join(docdir, "testfile"), "w").close()
  
      # create the directory that could be incorrectly detected as a file
      os.mkdir(os.path.join(docdir, "otherdir"))
  
      os.chdir(sources)
      dist = Distribution(
          {"packages": ["pkg"], "package_data": {"pkg": ["doc/*"]}}
      )
      # script_name need not exist, it just need to be initialized
      dist.script_name = os.path.join(sources, "setup.py")
      dist.script_args = ["build"]
      dist.parse_command_line()
  
      try:
          dist.run_commands()
      except DistutilsFileError:
          self.fail("failed package_data when data dir includes a dir")
  
file_path: catboost/contrib/tools/python/src/Lib/distutils/tests/test_build_py.py
imports: import os
  import sys
  import StringIO
  import unittest
  from distutils.command.build_py import build_py
  from distutils.core import Distribution
  from distutils.errors import DistutilsFileError
  from distutils.tests import support
  from test.test_support import run_unittest
label_desc: Use image node_id 3 for calling the BuildPyTestCase obj's underlying member method code with example usage: obj.test_dir_in_package_data() without return types