Author vstinner
Recipients ezio.melotti, louielu, mdk, michael.foord, rbcollins, serhiy.storchaka, vstinner
Date 2017-06-16.10:24:01
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1497608642.22.0.530817703541.issue30523@psf.upfronthosting.co.za>
In-reply-to
Content
Yeah, Louie fixed most issues!

> I concur with Julien, the result should be printed to stdout.

Done by Louie. The code now uses a simple print().

> I tried:
>
> $ ./python -m unittest test.test_builtin --list-tests
> doctest.DocTestCase.runTest
> doctest.DocTestCase.runTest
> ...

Using Louie's implementation, it "just" works!

haypo@selma$ ./python -m test test_builtin --list-cases|grep ^builtins
builtins.bin
builtins.float.as_integer_ratio
...

Even if these test names are not fully qualified, they are accept by --match/--matchfile!

./python -m test test_builtin --match=builtins.bin -v
...
0:00:00 load avg: 0.12 [1/1] test_builtin
bin (builtins)
Doctest: builtins.bin ... ok
...

So it will be possible to implement my bisect feature on these doctests as well!

I pushed Louie Lu's implementation: add a new --list-cases option to regrtest. Serhiy proposed a different CLI:

* --list=methods
* --list=files
* --list=classes

But I chose to push Louie's patch anyway since its patch is super simple and doesn't break anything: you can still use the existing --list-tests to list test *files*. I don't need --list=classes yet, it may be added later.

Serhiy: I plan to backport --matchfile and --list-cases features to 2.7, 3.5 and 3.6 branches, once Louie writes the unit test I requested him. Are you ok with that?

I really need to get my bisect tool on all branches, because more and more often I have to bisect refernece leaks, tests leaking resources (files, leaking memory, etc.), etc. --matchfile and --list-cases are the key features to implement such bisection.
History
Date User Action Args
2017-06-16 10:24:02vstinnersetrecipients: + vstinner, rbcollins, ezio.melotti, michael.foord, serhiy.storchaka, mdk, louielu
2017-06-16 10:24:02vstinnersetmessageid: <1497608642.22.0.530817703541.issue30523@psf.upfronthosting.co.za>
2017-06-16 10:24:02vstinnerlinkissue30523 messages
2017-06-16 10:24:01vstinnercreate