Message402257
It seems like fine grained error locations do not work in failed doctest traceback output:
version 3.11.0a0
file contents:
------------------
def a(x):
"""
>>> 1 1
1
"""
import doctest
doctest.testmod()
OUTPUT
-------
Failed example:
1 1
Exception raised:
Traceback (most recent call last):
File "/Users/ak/opensource/cpython/Lib/doctest.py", line 1348, in __run
exec(compile(example.source, filename, "single",
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "<doctest __main__.a[0]>", line 1
1 1
^
SyntaxError: invalid syntax. Perhaps you forgot a comma?
The location in doctests that causes this:
https://github.com/python/cpython/blob/5846c9b71ee9277fe866b1bdee4cc6702323fe7e/Lib/doctest.py#L1348 |
|
Date |
User |
Action |
Args |
2021-09-20 16:30:58 | andrei.avk | set | recipients:
+ andrei.avk, pablogsal, kj |
2021-09-20 16:30:58 | andrei.avk | set | messageid: <1632155458.61.0.570546761746.issue45249@roundup.psfhosted.org> |
2021-09-20 16:30:58 | andrei.avk | link | issue45249 messages |
2021-09-20 16:30:58 | andrei.avk | create | |
|