code: def test_strict(self):
      # testing the script option
      # when on, the register command stops if
      # the metadata is incomplete or if
      # long_description is not reSt compliant
  
      # empty metadata
      cmd = self._get_cmd({})
      cmd.ensure_finalized()
      cmd.strict = 1
      self.assertRaises(DistutilsSetupError, cmd.run)
  
      # metadata are OK but long_description is broken
      metadata = {
          "url": "xxx",
          "author": "xxx",
          "author_email": "éxéxé",
          "name": "xxx",
          "version": "xxx",
          "long_description": "title\n==\n\ntext",
      }
  
      cmd = self._get_cmd(metadata)
      cmd.ensure_finalized()
      cmd.strict = 1
      self.assertRaises(DistutilsSetupError, cmd.run)
  
      # now something that works
      metadata["long_description"] = "title\n=====\n\ntext"
      cmd = self._get_cmd(metadata)
      cmd.ensure_finalized()
      cmd.strict = 1
      inputs = RawInputs("1", "tarek", "y")
      register_module.raw_input = inputs.__call__
      # let's run the command
      try:
          cmd.run()
      finally:
          del register_module.raw_input
  
      # strict is not by default
      cmd = self._get_cmd()
      cmd.ensure_finalized()
      inputs = RawInputs("1", "tarek", "y")
      register_module.raw_input = inputs.__call__
      # let's run the command
      try:
          cmd.run()
      finally:
          del register_module.raw_input
  
      # and finally a Unicode test (bug #12114)
      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._get_cmd(metadata)
      cmd.ensure_finalized()
      cmd.strict = 1
      inputs = RawInputs("1", "tarek", "y")
      register_module.raw_input = inputs.__call__
      # let's run the command
      try:
          cmd.run()
      finally:
          del register_module.raw_input
  
imports: import os
  import unittest
  import getpass
  import urllib2
  import warnings
  from test.test_support import check_warnings, run_unittest
  from distutils.command import register
  from distutils.command.register import register
  from distutils.errors import DistutilsSetupError
  from distutils.tests.test_config import PyPIRCCommandTestCase
label_desc: Use image node_id 8 for calling the RegisterTestCase obj's underlying member method code with example usage: obj.test_strict() without return types