Commit b648b65a authored by Jeroen Demeyer's avatar Jeroen Demeyer Committed by Stefan Behnel

Always enable C line in traceback for tests (GH-3098)

parent 47f39d56
......@@ -1096,6 +1096,11 @@ class CythonCompileTestCase(unittest.TestCase):
from Cython.Build.Dependencies import update_pythran_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()):
if isinstance(matcher, str):
# lazy init
......
import traceback
# tag: traceback
def foo1():
foo2()
......@@ -21,6 +21,7 @@ def test_traceback(cline_in_traceback=None):
try:
foo1()
except:
import traceback
tb_string = traceback.format_exc()
expected = (
'tracebacks.pyx',
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment