def make_flocker_script_test(script, options, command_name):
 class FlockerScriptTestCase(TestCase, ):
  '\n        Test for classes that implement ``ICommandLineScript``\n        '
  def test_interface(self):
   '\n            A script that is meant to be run by ``FlockerScriptRunner`` must\n            implement ``ICommandLineScript``.\n            '
   self.assertTrue(verifyObject(ICommandLineScript, script()))
  def test_incorrect_arguments(self):
   '\n            ``FlockerScriptRunner.main`` exits with status 1 and prints help to\n            `stderr` if supplied with unexpected arguments.\n            '
   sys_module = FakeSysModule(argv=[command_name, '--unexpected_argument'])
   script_runner = FlockerScriptRunner(reactor=None, script=script(), options=options(), sys_module=sys_module)
   error = self.assertRaises(SystemExit, script_runner.main)
   error_text = sys_module.stderr.getvalue()
   self.assertEqual((1, []), (error.code, help_problems(command_name, error_text)))
 return FlockerScriptTestCase

def make_flocker_script_test ( script , options , command_name ) : class FlockerScriptTestCase ( TestCase , ) : def test_interface ( self ) : self . assertTrue ( verifyObject ( ICommandLineScript , script ( ) ) ) def test_incorrect_arguments ( self ) : sys_module = FakeSysModule ( argv = [ command_name , '--unexpected_argument' ] ) script_runner = FlockerScriptRunner ( reactor = None , script = script ( ) , options = options ( ) , sys_module = sys_module ) error = self . assertRaises ( SystemExit , script_runner . main ) error_text = sys_module . stderr . getvalue ( ) self . assertEqual ( ( 1 , [ ] ) , ( error . code , help_problems ( command_name , error_text ) ) ) return FlockerScriptTestCase
return a flockerscripttestcase which tests that the script class provides icommandlinescript .