Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
L
LabComm
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
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
Sven Gestegård Robertz
LabComm
Commits
a3924ab2
Commit
a3924ab2
authored
11 years ago
by
Anders Blomdell
Browse files
Options
Downloads
Patches
Plain Diff
Handle escaped '-' at start of test arguments.
parent
469abde1
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
test/test_encoder_decoder.py
+10
-5
10 additions, 5 deletions
test/test_encoder_decoder.py
with
10 additions
and
5 deletions
test/test_encoder_decoder.py
+
10
−
5
View file @
a3924ab2
...
@@ -174,7 +174,6 @@ class Test:
...
@@ -174,7 +174,6 @@ class Test:
for
name
,
signature
in
self
.
signatures
:
for
name
,
signature
in
self
.
signatures
:
encoder
.
add_decl
(
signature
)
encoder
.
add_decl
(
signature
)
pass
pass
print
self
.
signatures
for
name
,
signature
in
self
.
signatures
:
for
name
,
signature
in
self
.
signatures
:
print
"
Checking
"
,
name
,
print
"
Checking
"
,
name
,
sys
.
stdout
.
flush
()
sys
.
stdout
.
flush
()
...
@@ -191,7 +190,9 @@ class Test:
...
@@ -191,7 +190,9 @@ class Test:
print
print
pass
pass
p
.
stdin
.
close
()
p
.
stdin
.
close
()
print
p
.
wait
()
if
p
.
wait
()
!=
0
:
exit
(
1
)
pass
pass
pass
def
decode
(
self
,
f
):
def
decode
(
self
,
f
):
...
@@ -217,7 +218,6 @@ class Test:
...
@@ -217,7 +218,6 @@ class Test:
pass
pass
except
EOFError
:
except
EOFError
:
pass
pass
print
'
Done
'
pass
pass
pass
pass
...
@@ -231,8 +231,13 @@ if __name__ == "__main__":
...
@@ -231,8 +231,13 @@ if __name__ == "__main__":
parser
=
argparse
.
ArgumentParser
(
description
=
'
Run encoding test.
'
)
parser
=
argparse
.
ArgumentParser
(
description
=
'
Run encoding test.
'
)
class
test_action
(
argparse
.
Action
):
class
test_action
(
argparse
.
Action
):
def
__call__
(
self
,
parser
,
namespace
,
values
,
option_string
=
None
):
def
__call__
(
self
,
parser
,
namespace
,
values
,
option_string
=
None
):
old
=
getattr
(
namespace
,
self
.
dest
)
old
=
list
(
getattr
(
namespace
,
self
.
dest
))
old
.
append
(
values
)
def
strip_slash
(
s
):
if
s
.
startswith
(
'
\\
'
):
return
s
[
1
:]
return
s
old
.
append
(
map
(
strip_slash
,
values
))
setattr
(
namespace
,
self
.
dest
,
old
)
parser
.
add_argument
(
'
--signatures
'
)
parser
.
add_argument
(
'
--signatures
'
)
parser
.
add_argument
(
'
--test
'
,
nargs
=
'
*
'
,
action
=
test_action
,
default
=
[])
parser
.
add_argument
(
'
--test
'
,
nargs
=
'
*
'
,
action
=
test_action
,
default
=
[])
...
...
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