def make_script_tests(executable):
 class ScriptTests(TestCase, ):
  @skipUnless(which(executable), (executable + ' not installed'))
  def test_version(self):
   '\n            The script is a command available on the system path.\n            '
   result = run_process(([executable] + ['--version']))
   self.assertEqual(result.output, ('%s\n' % (__version__,)))
  @skipUnless(which(executable), (executable + ' not installed'))
  def test_identification(self):
   '\n            The script identifies itself as what it is.\n            '
   result = run_process(([executable] + ['--help']))
   self.assertIn(executable, result.output)
 return ScriptTests

def make_script_tests ( executable ) : class ScriptTests ( TestCase , ) : @ skipUnless ( which ( executable ) , ( executable + ' not installed' ) ) def test_version ( self ) : result = run_process ( ( [ executable ] + [ '--version' ] ) ) self . assertEqual ( result . output , ( '%s\n' % ( __version__ , ) ) ) @ skipUnless ( which ( executable ) , ( executable + ' not installed' ) ) def test_identification ( self ) : result = run_process ( ( [ executable ] + [ '--help' ] ) ) self . assertIn ( executable , result . output ) return ScriptTests
generate a test suite which applies to any flocker-installed node script .