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.
Created on 2013年09月08日 14:48 by serhiy.storchaka, last changed 2022年04月11日 14:57 by admin.
| Files | ||||
|---|---|---|---|---|
| File name | Uploaded | Description | Edit | |
| profile_argparse.patch | serhiy.storchaka, 2013年09月08日 14:48 | review | ||
| Messages (8) | |||
|---|---|---|---|
| msg197262 - (view) | Author: Serhiy Storchaka (serhiy.storchaka) * (Python committer) | 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) * (Python committer) | Date: 2013年09月13日 20:40 | |
Is the command-line interface covered by tests? |
|||
| msg197660 - (view) | Author: Serhiy Storchaka (serhiy.storchaka) * (Python committer) | 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) * (Python committer) | 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) * (Python committer) | 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 |
|||
| History | |||
|---|---|---|---|
| Date | User | Action | Args |
| 2022年04月11日 14:57:50 | admin | set | github: 63171 |
| 2018年07月11日 17:43:50 | yan12125 | set | nosy:
+ yan12125 |
| 2017年04月20日 15:39:35 | louielu | set | messages: + msg291982 |
| 2017年04月20日 14:56:42 | r.david.murray | set | nosy:
+ r.david.murray messages: + msg291978 |
| 2017年04月20日 14:47:05 | vstinner | set | nosy:
+ vstinner messages: + msg291977 |
| 2017年04月20日 14:44:05 | louielu | set | nosy:
+ louielu messages: + msg291976 |
| 2016年12月01日 16:11:57 | wolma | set | nosy:
+ wolma messages: + msg282192 title: calendar -> Use argparse in the profile/cProfile modules |
| 2016年12月01日 16:10:46 | wolma | set | title: Use argparse in the profile/cProfile modules -> calendar |
| 2013年09月13日 20:56:32 | serhiy.storchaka | set | messages: + msg197660 |
| 2013年09月13日 20:40:11 | ezio.melotti | set | nosy:
+ ezio.melotti messages: + msg197649 |
| 2013年09月08日 14:48:55 | serhiy.storchaka | create | |