code: def test_check_metadata(self):
      # let's run the command with no metadata at all
      # by default, check is checking the metadata
      # should have some warnings
      cmd = self._run()
      self.assertEqual(cmd._warnings, 2)
  
      # now let's add the required fields
      # and run it again, to make sure we don't get
      # any warning anymore
      metadata = {
          "url": "xxx",
          "author": "xxx",
          "author_email": "xxx",
          "name": "xxx",
          "version": "xxx",
      }
      cmd = self._run(metadata)
      self.assertEqual(cmd._warnings, 0)
  
      # now with the strict mode, we should
      # get an error if there are missing metadata
      self.assertRaises(
          DistutilsSetupError, self._run, {}, **{"strict": 1}
      )
  
      # and of course, no error when all metadata are present
      cmd = self._run(metadata, strict=1)
      self.assertEqual(cmd._warnings, 0)
  
      # now a test with Unicode entries
      metadata = {
          "url": "xxx",
          "author": "\u00c9ric",
          "author_email": "xxx",
          "name": "xxx",
          "version": "xxx",
          "description": "Something about esszet \u00df",
          "long_description": "More things about esszet \u00df",
      }
      cmd = self._run(metadata)
      self.assertEqual(cmd._warnings, 0)
  
file_path: catboost/contrib/tools/python/src/Lib/distutils/tests/test_check.py
imports: import textwrap
  import unittest
  from test.test_support import run_unittest
  from distutils.command.check import check, HAS_DOCUTILS
  from distutils.tests import support
  from distutils.errors import DistutilsSetupError
label_desc: Use image node_id 2 for calling the CheckTestCase obj's underlying member method code with example usage: obj.test_check_metadata() without return types