New submission from Rémi Lapeyre <remi.lape...@henki.fr>:

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?

----------
files: 0001-WIP.patch
keywords: patch
messages: 335944
nosy: remi.lapeyre
priority: normal
severity: normal
status: open
title: Add method to get user defined command line arguments in unittest.main
Added file: https://bugs.python.org/file48154/0001-WIP.patch

_______________________________________
Python tracker <rep...@bugs.python.org>
<https://bugs.python.org/issue36036>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to