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
Labels
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Commits
Open sidebar
nexedi
cython
Commits
b648b65a
Commit
b648b65a
authored
Aug 26, 2019
by
Jeroen Demeyer
Committed by
Stefan Behnel
Apr 26, 2020
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Always enable C line in traceback for tests (GH-3098)
parent
47f39d56
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
7 additions
and
1 deletion
+7
-1
runtests.py
runtests.py
+5
-0
tests/run/tracebacks.pyx
tests/run/tracebacks.pyx
+2
-1
No files found.
runtests.py
View file @
b648b65a
...
@@ -1096,6 +1096,11 @@ class CythonCompileTestCase(unittest.TestCase):
...
@@ -1096,6 +1096,11 @@ class CythonCompileTestCase(unittest.TestCase):
from Cython.Build.Dependencies import update_pythran_extension
from Cython.Build.Dependencies import update_pythran_extension
update_pythran_extension(extension)
update_pythran_extension(extension)
# Compile with -DCYTHON_CLINE_IN_TRACEBACK=1 unless we have
# the "traceback" tag
if 'traceback' not in self.tags['tag']:
extension.define_macros.append(("CYTHON_CLINE_IN_TRACEBACK", 1))
for matcher, fixer in list(EXT_EXTRAS.items()):
for matcher, fixer in list(EXT_EXTRAS.items()):
if isinstance(matcher, str):
if isinstance(matcher, str):
# lazy init
# lazy init
...
...
tests/run/tracebacks.pyx
View file @
b648b65a
import
traceback
# tag:
traceback
def
foo1
():
def
foo1
():
foo2
()
foo2
()
...
@@ -21,6 +21,7 @@ def test_traceback(cline_in_traceback=None):
...
@@ -21,6 +21,7 @@ def test_traceback(cline_in_traceback=None):
try
:
try
:
foo1
()
foo1
()
except
:
except
:
import
traceback
tb_string
=
traceback
.
format_exc
()
tb_string
=
traceback
.
format_exc
()
expected
=
(
expected
=
(
'tracebacks.pyx'
,
'tracebacks.pyx'
,
...
...
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