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
Deploy
Releases
Model registry
Monitor
Incidents
Analyze
Value stream analytics
Contributor 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
Anders Blomdell
LabComm
Commits
14e29fd7
Commit
14e29fd7
authored
10 years ago
by
Anders Blomdell
Browse files
Options
Downloads
Patches
Plain Diff
Make diagnostics go to stderr.
parent
b35ee46b
No related branches found
No related tags found
No related merge requests found
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
test/test_encoder_decoder.py
+5
-6
5 additions, 6 deletions
test/test_encoder_decoder.py
with
5 additions
and
6 deletions
test/test_encoder_decoder.py
+
5
−
6
View file @
14e29fd7
...
...
@@ -81,7 +81,7 @@ def generate(decl):
elif
decl
.
__class__
==
labcomm
.
STRING
:
return
[
'
string
'
,
u
'
sträng
'
]
print
decl
print
>>
sys
.
stderr
,
decl
raise
Exception
(
"
unhandled decl %s
"
%
decl
.
__class__
)
def
labcomm_compile
(
lc
,
name
,
args
):
...
...
@@ -118,7 +118,7 @@ class Test:
pass
def
run
(
self
):
print
'
Testing
'
,
self
.
program
print
>>
sys
.
stderr
,
'
Testing
'
,
self
.
program
p
=
subprocess
.
Popen
(
self
.
program
,
stdin
=
subprocess
.
PIPE
,
stdout
=
subprocess
.
PIPE
)
...
...
@@ -132,8 +132,7 @@ class Test:
encoder
.
add_decl
(
signature
)
pass
for
name
,
signature
in
self
.
signatures
:
print
"
Checking
"
,
name
,
sys
.
stdout
.
flush
()
print
>>
sys
.
stderr
,
"
Checking
"
,
name
,
for
decl
,
value
in
generate
(
signature
):
sys
.
stdout
.
write
(
'
.
'
)
#print name,decl,value,value.__class__
...
...
@@ -144,7 +143,7 @@ class Test:
p
.
terminate
()
exit
(
1
)
pass
print
print
>>
sys
.
stderr
pass
p
.
stdin
.
close
()
if
p
.
wait
()
!=
0
:
...
...
@@ -159,7 +158,7 @@ class Test:
value
,
decl
=
decoder
.
decode
()
if
value
!=
None
:
if
value
!=
self
.
expected
:
print
"
Coding error
"
,
value
,
self
.
expected
,
decl
print
>>
sys
.
stderr
,
"
Coding error
"
,
value
,
self
.
expected
,
decl
self
.
failed
=
True
self
.
next
.
release
()
pass
...
...
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