01_test_help.py 1.2 KB

1234567891011121314151617181920212223242526272829303132333435363738
  1. # vim: set fileencoding=utf-8 :
  2. """Check if --help works"""
  3. from . import context
  4. import unittest
  5. class TestHelp(unittest.TestCase):
  6. """Test help output of gbp commands"""
  7. def testHelp(self):
  8. for script in ['buildpackage',
  9. 'clone',
  10. 'config',
  11. 'create_remote_repo',
  12. 'dch',
  13. 'import_orig',
  14. 'import_dsc',
  15. 'pull',
  16. 'pq']:
  17. module = 'gbp.scripts.%s' % script
  18. m = __import__(module, globals(), locals(), ['main'], 0)
  19. self.assertRaises(SystemExit,
  20. m.main,
  21. ['doesnotmatter', '--help'])
  22. """Test help output of RPM-specific commands"""
  23. def testHelpRpm(self):
  24. for script in ['import_srpm']:
  25. module = 'gbp.scripts.%s' % script
  26. m = __import__(module, globals(), locals(), ['main'], 0)
  27. self.assertRaises(SystemExit,
  28. m.main,
  29. ['doesnotmatter', '--help'])
  30. # vim:et:ts=4:sw=4:et:sts=4:ai:set list listchars=tab\:»·,trail\:·: