Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
mat2
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Model registry
Operate
Environments
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
tails
mat2
Commits
3649c0cc
Commit
3649c0cc
authored
6 years ago
by
Julien (jvoisin) Voisin
Browse files
Options
Downloads
Patches
Plain Diff
Remove short version of dangerous/advanced options
parent
119085f2
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
mat2
+2
-2
2 additions, 2 deletions
mat2
tests/test_climat2.py
+4
-2
4 additions, 2 deletions
tests/test_climat2.py
with
6 additions
and
4 deletions
mat2
+
2
−
2
View file @
3649c0cc
...
...
@@ -37,11 +37,11 @@ def create_arg_parser():
version
=
'
MAT2 %s
'
%
__version__
)
parser
.
add_argument
(
'
-l
'
,
'
--list
'
,
action
=
'
store_true
'
,
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
'
)
parser
.
add_argument
(
'
-V
'
,
'
--verbose
'
,
action
=
'
store_true
'
,
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
'
+
'
(policy should be abort, omit, or keep)
'
)
...
...
This diff is collapsed.
Click to expand it.
tests/test_climat2.py
+
4
−
2
View file @
3649c0cc
...
...
@@ -8,14 +8,16 @@ class TestHelp(unittest.TestCase):
def
test_help
(
self
):
proc
=
subprocess
.
Popen
([
'
./mat2
'
,
'
--help
'
],
stdout
=
subprocess
.
PIPE
)
stdout
,
_
=
proc
.
communicate
()
self
.
assertIn
(
b
'
usage: mat2 [-h] [-v] [-l] [-
c] [-V] [-u policy] [-s | -L] [fil
es [
files ...]
]
'
,
self
.
assertIn
(
b
'
usage: mat2 [-h] [-v] [-l] [-
-check-dependenci
es
]
[
-V
]
'
,
stdout
)
self
.
assertIn
(
b
'
[--unknown-members policy] [-s | -L]
'
,
stdout
)
def
test_no_arg
(
self
):
proc
=
subprocess
.
Popen
([
'
./mat2
'
],
stdout
=
subprocess
.
PIPE
)
stdout
,
_
=
proc
.
communicate
()
self
.
assertIn
(
b
'
usage: mat2 [-h] [-v] [-l] [-
c] [-V] [-u policy] [-s | -L] [fil
es [
files ...]
]
'
,
self
.
assertIn
(
b
'
usage: mat2 [-h] [-v] [-l] [-
-check-dependenci
es
]
[
-V
]
'
,
stdout
)
self
.
assertIn
(
b
'
[--unknown-members policy] [-s | -L]
'
,
stdout
)
class
TestVersion
(
unittest
.
TestCase
):
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment