Author vstinner
Recipients ezio.melotti, louielu, mdk, michael.foord, rbcollins, serhiy.storchaka, vstinner
Date 2017-06-16.15:45:30
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1497627930.71.0.926596730983.issue30523@psf.upfronthosting.co.za>
In-reply-to
Content
On Python 2.7, listing *all* test cases with "./python -m test --list-cases" fails on the following test files:

* test_multibytecodec_support 
* test_robotparser
* test_xpickle

regrtest of Python 2.7 uses the test_main() function of each test file, if the function is defined. Whereas --list-cases is more written as a raw discovery function listing all cases which inherit from unittest.TestCase. These 3 files have base test cases which are "abstract" or configured below.

Options:

* Modify --list-cases to tolerate failures and report them at exit
* Modify these 3 tests to make them more "test discovery"-friendly
* Use test_main() function if available but modify its behaviour to only list test cases, instead of running them

I would prefer to limit changes in Python 2.7 branch, so IMHO the second option is the best: modify the 3 tests.
History
Date User Action Args
2017-06-16 15:45:30vstinnersetrecipients: + vstinner, rbcollins, ezio.melotti, michael.foord, serhiy.storchaka, mdk, louielu
2017-06-16 15:45:30vstinnersetmessageid: <1497627930.71.0.926596730983.issue30523@psf.upfronthosting.co.za>
2017-06-16 15:45:30vstinnerlinkissue30523 messages
2017-06-16 15:45:30vstinnercreate