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
Show 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):
...
@@ -836,12 +836,13 @@ class CythonCompileTestCase(unittest.TestCase):
finally:
finally:
sys.stderr = old_stderr
sys.stderr = old_stderr
tostderr = sys.stderr.write
if 'cerror' in self.tags['tag']:
if 'cerror' in self.tags['tag']:
if errors:
if errors:
print("
\
n
===
Expected
C
compile
error
===
")
tostderr("
\
n
===
Expected
C
compile
error
===
\
n
")
print("
\
n
\
n
===
Got
Cython
errors
:
===
")
tostderr("
\
n
===
Got
Cython
errors
:
===
\
n
")
print
('
\
n
'.join(errors))
tostderr
('
\
n
'.join(errors))
print('
\
n
')
tostderr('
\
n
\
n
')
raise RuntimeError('should have generated extension code')
raise RuntimeError('should have generated extension code')
elif errors or expected_errors:
elif errors or expected_errors:
try:
try:
...
@@ -854,11 +855,11 @@ class CythonCompileTestCase(unittest.TestCase):
...
@@ -854,11 +855,11 @@ class CythonCompileTestCase(unittest.TestCase):
unexpected_error = errors[len(expected_errors)]
unexpected_error = errors[len(expected_errors)]
self.assertEquals(None, unexpected_error)
self.assertEquals(None, unexpected_error)
except AssertionError:
except AssertionError:
print("
\
n
===
Expected
errors
:
===
")
tostderr("
\
n
===
Expected
errors
:
===
\
n
")
print
('
\
n
'.join(expected_errors))
tostderr
('
\
n
'.join(expected_errors))
print("
\
n
\
n
===
Got
errors
:
===
")
tostderr("
\
n
\
n
===
Got
errors
:
===
\
n
")
print
('
\
n
'.join(errors))
tostderr
('
\
n
'.join(errors))
print('
\
n
')
tostderr('
\
n
\
n
')
raise
raise
return None
return None
...
@@ -883,14 +884,14 @@ class CythonCompileTestCase(unittest.TestCase):
...
@@ -883,14 +884,14 @@ class CythonCompileTestCase(unittest.TestCase):
if show_output:
if show_output:
stdout = get_stdout and get_stdout().strip()
stdout = get_stdout and get_stdout().strip()
if stdout:
if stdout:
print("
\
n
===
C
/
C
++
compiler
output
:
===
")
tostderr("
\
n
===
C
/
C
++
compiler
output
:
===
\
n
")
print_bytes(stdout, end=None)
print_bytes(stdout, end=None
, file=sys.stderr
)
stderr = get_stderr and get_stderr().strip()
stderr = get_stderr and get_stderr().strip()
if stderr:
if stderr:
print("
\
n
===
C
/
C
++
compiler
error
output
:
===
")
tostderr("
\
n
===
C
/
C
++
compiler
error
output
:
===
\
n
")
print_bytes(stderr, end=None)
print_bytes(stderr, end=None
, file=sys.stderr
)
if stdout or stderr:
if stdout or stderr:
print("
\
n
==============================
")
tostderr("
\
n
==============================
\
n
")
return so_path
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