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 remi.lapeyre
Recipients remi.lapeyre
Date 2019-02-19.13:06:20
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1550581580.85.0.535660142284.issue36036@roundup.psfhosted.org>
In-reply-to
Content
Hi, I'm working on issue 18765 (running pdb.post_mortem() on failing test cases) where I need to control the behavior of a TestCase based on some outside input.

For this issue, I want to add a new --pdb option to turn this feature on when enabled. As of today, it seems to me that the command line arguments given to the TestProgram are not accessible from the TestCase.

Would adding a new parameter to TestCase be breaking backward compatibility? If so, what would be a better way to access command line arguments from TestCase?



In addition to this, I have the need for another project to change the behavior of TestCases based on a custom command line argument. I propose to add a new method `getCustomArguments` that will take the parser as input so the user can define it's own arguments by subclassing TestProgram

What do you think about this?
History
Date User Action Args
2019-02-19 13:06:20remi.lapeyresetrecipients: + remi.lapeyre
2019-02-19 13:06:20remi.lapeyresetmessageid: <1550581580.85.0.535660142284.issue36036@roundup.psfhosted.org>
2019-02-19 13:06:20remi.lapeyrelinkissue36036 messages
2019-02-19 13:06:20remi.lapeyrecreate