Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
C
cython
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Boxiang Sun
cython
Commits
e8c85867
Commit
e8c85867
authored
May 03, 2014
by
Stefan Behnel
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
send C compiler output in tests to same output stream (stderr) as unittest's output
parent
cb9c9a5b
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
15 additions
and
14 deletions
+15
-14
runtests.py
runtests.py
+15
-14
No files found.
runtests.py
View file @
e8c85867
...
...
@@ -836,12 +836,13 @@ class CythonCompileTestCase(unittest.TestCase):
finally:
sys.stderr = old_stderr
tostderr = sys.stderr.write
if 'cerror' in self.tags['tag']:
if errors:
print("
\
n
===
Expected
C
compile
error
===
")
print("
\
n
\
n
===
Got
Cython
errors
:
===
")
print
('
\
n
'.join(errors))
print('
\
n
')
tostderr("
\
n
===
Expected
C
compile
error
===
\
n
")
tostderr("
\
n
===
Got
Cython
errors
:
===
\
n
")
tostderr
('
\
n
'.join(errors))
tostderr('
\
n
\
n
')
raise RuntimeError('should have generated extension code')
elif errors or expected_errors:
try:
...
...
@@ -854,11 +855,11 @@ class CythonCompileTestCase(unittest.TestCase):
unexpected_error = errors[len(expected_errors)]
self.assertEquals(None, unexpected_error)
except AssertionError:
print("
\
n
===
Expected
errors
:
===
")
print
('
\
n
'.join(expected_errors))
print("
\
n
\
n
===
Got
errors
:
===
")
print
('
\
n
'.join(errors))
print('
\
n
')
tostderr("
\
n
===
Expected
errors
:
===
\
n
")
tostderr
('
\
n
'.join(expected_errors))
tostderr("
\
n
\
n
===
Got
errors
:
===
\
n
")
tostderr
('
\
n
'.join(errors))
tostderr('
\
n
\
n
')
raise
return None
...
...
@@ -883,14 +884,14 @@ class CythonCompileTestCase(unittest.TestCase):
if show_output:
stdout = get_stdout and get_stdout().strip()
if stdout:
print("
\
n
===
C
/
C
++
compiler
output
:
===
")
print_bytes(stdout, end=None)
tostderr("
\
n
===
C
/
C
++
compiler
output
:
===
\
n
")
print_bytes(stdout, end=None
, file=sys.stderr
)
stderr = get_stderr and get_stderr().strip()
if stderr:
print("
\
n
===
C
/
C
++
compiler
error
output
:
===
")
print_bytes(stderr, end=None)
tostderr("
\
n
===
C
/
C
++
compiler
error
output
:
===
\
n
")
print_bytes(stderr, end=None
, file=sys.stderr
)
if stdout or stderr:
print("
\
n
==============================
")
tostderr("
\
n
==============================
\
n
")
return so_path
...
...
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