diff options
Diffstat (limited to 'tests')
-rw-r--r-- | tests/01_test_help.py | 22 |
1 files changed, 13 insertions, 9 deletions
diff --git a/tests/01_test_help.py b/tests/01_test_help.py index 1974c30..e30bc45 100644 --- a/tests/01_test_help.py +++ b/tests/01_test_help.py @@ -7,16 +7,20 @@ import unittest class TestHelp(unittest.TestCase): """Test help output of gbp commands""" - os.environ['PYTHONPATH'] = '.' def testHelp(self): - for prog in [ "buildpackage", "import-orig", "import-dsc", "dch" ]: - ret = os.system("bin/git-%s --help >/dev/null" % prog) - self.assertEqual(ret, 0) - - def testHelpGbp(self): - for prog in [ "pull", "clone", "pq", "create-remote-repo" ]: - ret = os.system("bin/gbp-%s --help >/dev/null" % prog) - self.assertEqual(ret, 0) + for script in ['buildpackage', + 'clone', + 'create_remote_repo', + 'dch', + 'import_orig', + 'import_dsc', + 'pull', + 'pq']: + module = 'gbp.scripts.%s' % script + m = __import__(module, globals(), locals(), ['main'], -1) + self.assertRaises(SystemExit, + m.main, + ['doesnotmatter', '--help']) # vim:et:ts=4:sw=4:et:sts=4:ai:set list listchars=tab\:»·,trail\:·: |