1
0
mirror of synced 2024-11-25 18:54:22 +01:00

Remove short version of dangerous/advanced options

This commit is contained in:
jvoisin 2018-09-05 17:48:14 +02:00
parent 119085f28d
commit 3649c0ccaf
2 changed files with 6 additions and 4 deletions

4
mat2
View File

@ -37,11 +37,11 @@ def create_arg_parser():
version='MAT2 %s' % __version__) version='MAT2 %s' % __version__)
parser.add_argument('-l', '--list', action='store_true', parser.add_argument('-l', '--list', action='store_true',
help='list all supported fileformats') help='list all supported fileformats')
parser.add_argument('-c', '--check-dependencies', action='store_true', parser.add_argument('--check-dependencies', action='store_true',
help='check if MAT2 has all the dependencies it needs') help='check if MAT2 has all the dependencies it needs')
parser.add_argument('-V', '--verbose', action='store_true', parser.add_argument('-V', '--verbose', action='store_true',
help='show more verbose status information') help='show more verbose status information')
parser.add_argument('-u', '--unknown-members', metavar='policy', default='abort', parser.add_argument('--unknown-members', metavar='policy', default='abort',
help='how to handle unknown members of archive-style files ' + help='how to handle unknown members of archive-style files ' +
'(policy should be abort, omit, or keep)') '(policy should be abort, omit, or keep)')

View File

@ -8,14 +8,16 @@ class TestHelp(unittest.TestCase):
def test_help(self): def test_help(self):
proc = subprocess.Popen(['./mat2', '--help'], stdout=subprocess.PIPE) proc = subprocess.Popen(['./mat2', '--help'], stdout=subprocess.PIPE)
stdout, _ = proc.communicate() stdout, _ = proc.communicate()
self.assertIn(b'usage: mat2 [-h] [-v] [-l] [-c] [-V] [-u policy] [-s | -L] [files [files ...]]', self.assertIn(b'usage: mat2 [-h] [-v] [-l] [--check-dependencies] [-V]',
stdout) stdout)
self.assertIn(b'[--unknown-members policy] [-s | -L]', stdout)
def test_no_arg(self): def test_no_arg(self):
proc = subprocess.Popen(['./mat2'], stdout=subprocess.PIPE) proc = subprocess.Popen(['./mat2'], stdout=subprocess.PIPE)
stdout, _ = proc.communicate() stdout, _ = proc.communicate()
self.assertIn(b'usage: mat2 [-h] [-v] [-l] [-c] [-V] [-u policy] [-s | -L] [files [files ...]]', self.assertIn(b'usage: mat2 [-h] [-v] [-l] [--check-dependencies] [-V]',
stdout) stdout)
self.assertIn(b'[--unknown-members policy] [-s | -L]', stdout)
class TestVersion(unittest.TestCase): class TestVersion(unittest.TestCase):