STINNER Victor added the comment:
Ah something else: doctests are not fully supported.
./python -m test test_extcall --list-cases
This command has not output, whereas Lib/test/test_extcall.py contains doctests.
test_builtins works because it uses:
def load_tests(loader, tests, pattern):
from doctest import DocTestSuite
tests.addTest(DocTestSuite(builtins))
return tests
whereas test_extcall uses:
def test_main():
support.run_doctest(sys.modules[__name__], True)
I see two options:
* Replace support.run_doctest() with doctest.DocTestSuite() in all tests
* Enhance --list-cases to discover doctests. support.run_doctest() calls
doctest.testmod(), but doctest.testmod() has no API to list tests. testmod()
lists tests and directly runs them. Maybe --list-cases can reuse
doctest.DocTestSuite(), I don't know.
I chose to merge Louie Lu's PR anyway, since I prefer to move step by step.
Supporting test_extcall can be done later.
----------
_______________________________________
Python tracker <[email protected]>
<http://bugs.python.org/issue30523>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe:
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com