This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author vstinner
Recipients ezio.melotti, louielu, mdk, michael.foord, rbcollins, serhiy.storchaka, vstinner
Date 2017-06-16.10:29:24
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1497608964.13.0.815464724233.issue30523@psf.upfronthosting.co.za>
In-reply-to
Content
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.
History
Date User Action Args
2017-06-16 10:29:24vstinnersetrecipients: + vstinner, rbcollins, ezio.melotti, michael.foord, serhiy.storchaka, mdk, louielu
2017-06-16 10:29:24vstinnersetmessageid: <1497608964.13.0.815464724233.issue30523@psf.upfronthosting.co.za>
2017-06-16 10:29:24vstinnerlinkissue30523 messages
2017-06-16 10:29:24vstinnercreate