msg197262 - (view) |
Author: Serhiy Storchaka (serhiy.storchaka) *  |
Date: 2013-09-08 14:48 |
Here is a patch which replaces optparse to argparse in the profile and cProfile modules. |
|
|
msg197649 - (view) |
Author: Ezio Melotti (ezio.melotti) *  |
Date: 2013-09-13 20:40 |
Is the command-line interface covered by tests? |
|
|
msg197660 - (view) |
Author: Serhiy Storchaka (serhiy.storchaka) *  |
Date: 2013-09-13 20:56 |
No. And I know your next proposition. :-( |
|
|
msg282192 - (view) |
Author: Wolfgang Maier (wolma) * |
Date: 2016-12-01 16:11 |
oops, typing in wrong window. Very sorry. |
|
|
msg291976 - (view) |
Author: Louie Lu (louielu) * |
Date: 2017-04-20 14:44 |
bad news, somehow the output of std.err and std.out have different between optparse and argparse, even if the test is done, it still need to convert some testcase to argparse compatible. |
|
|
msg291977 - (view) |
Author: STINNER Victor (vstinner) *  |
Date: 2017-04-20 14:47 |
> bad news, somehow the output of std.err and std.out have different between optparse and argparse Only test argparse. I don't think that it matters to test that the change doesn't change the behaviour. You can also redirect stderr to stdout. What do you want to test? |
|
|
msg291978 - (view) |
Author: R. David Murray (r.david.murray) *  |
Date: 2017-04-20 14:56 |
Well, part of the point of the tests is to make sure the module's behavior doesn't change when doing the conversion to argparse. But "behavior changing" doesn't extend to the exact format of the output...that can change, as long as what the module *does* given specific cli argument combinations stays the same. Ideally, you write the tests so that it is not sensitive to the exact output, but realistically some tests may need to be different between the optparse case and the argparse case to get good coverage. Note that even with good tests, you can still miss behavior changes. We tried to do a good job on the tests for compileall, for example, and we still introduced a bug or two when we converted to argparse. |
|
|
msg291982 - (view) |
Author: Louie Lu (louielu) * |
Date: 2017-04-20 15:39 |
haypo, murray, thanks for pointing this thing, I will let go about the bad message test, move to output file and sort test tomorrow, also add a new issue: #30118 |
|
|