Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
slapos
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Labels
Merge Requests
104
Merge Requests
104
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Jobs
Commits
Open sidebar
nexedi
slapos
Commits
8d0ae96c
Commit
8d0ae96c
authored
Aug 16, 2011
by
Łukasz Nowak
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Assert SystemExit with comments.
parent
2e566904
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
6 deletions
+5
-6
slapos/tests/slapgrid.py
slapos/tests/slapgrid.py
+5
-6
No files found.
slapos/tests/slapgrid.py
View file @
8d0ae96c
...
...
@@ -485,6 +485,8 @@ buildout = /path/to/buildout/binary
Raises if the argument list if empty and without configuration file.
"""
parser
=
slapgrid
.
parseArgumentTupleAndReturnSlapgridObject
# XXX: SystemExit is too generic exception, it is only known that
# something is wrong
self
.
assertRaises
(
SystemExit
,
parser
,
*
())
def
test_default_argument_tuple
(
self
):
...
...
@@ -496,11 +498,6 @@ buildout = /path/to/buildout/binary
return_list
=
parser
(
*
self
.
default_arg_tuple
)
self
.
assertEquals
(
2
,
len
(
return_list
))
# XXX(lucas): the error method from argparse.ArgumentParser()
# uses a bad approach to raise an error. It just print the message
# and call a exit method which stops the process completly and the other
# tests are not able to be executed.
# Could we patch the error method for a better coverage?
def
test_signature_private_key_file_non_exists
(
self
):
"""
Raises if the signature_private_key_file does not exists.
...
...
@@ -508,7 +505,9 @@ buildout = /path/to/buildout/binary
parser
=
slapgrid
.
parseArgumentTupleAndReturnSlapgridObject
argument_tuple
=
(
"--signature_private_key_file"
,
"/non/exists/path"
)
+
\
self
.
default_arg_tuple
#self.assertRaises(Exception, parser, *argument_tuple)
# XXX: SystemExit is too generic exception, it is only known that
# something is wrong
self
.
assertRaises
(
SystemExit
,
parser
,
*
argument_tuple
)
def
test_signature_private_key_file
(
self
):
"""
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment