[issue18765] unittest needs a way to launch pdb.post_mortem or other debug hooks

2021-05-19 Thread Dominik Vilsmeier
Dominik Vilsmeier added the comment: I wasn't aware of this issue so apparently I submitted a duplicate (#42722) half a year ago. The solution I implemented relies on simply calling `TestCase.debug` and `TestSuite.debug` which makes it a lightweight change. From the perspective of the debugg

[issue18765] unittest needs a way to launch pdb.post_mortem or other debug hooks

2020-05-01 Thread Terry J. Reedy
Terry J. Reedy added the comment: See #36825 about making TextCase argument aware. -- ___ Python tracker ___ ___ Python-bugs-list m

[issue18765] unittest needs a way to launch pdb.post_mortem or other debug hooks

2020-05-01 Thread Terry J. Reedy
Terry J. Reedy added the comment: I would be more interested in being able to launch IDLE's visual debugger (likely after some revision) so I would want the hook to be general (as suggested by the current title) and not limited to only pdb. -- nosy: +terry.reedy

[issue18765] unittest needs a way to launch pdb.post_mortem or other debug hooks

2019-10-27 Thread Benjamin Edwards
Benjamin Edwards added the comment: Hi Rémi, I'd also be happy to take a look at your problem, if it's still open, do you have patch of what you've done so far? -- nosy: +benedwards14 ___ Python tracker

[issue18765] unittest needs a way to launch pdb.post_mortem or other debug hooks

2019-05-08 Thread Rémi Lapeyre
Rémi Lapeyre added the comment: Hi Windson, I had a working patch but got stuck on making this behavior optional (the `if SOMETHING_SAYS_TO_ENABLE_THIS:` in @gregory.p.smith initial post). To make TestCase aware of the command line arguments given to the test runner I opened issue 36825 so w

[issue18765] unittest needs a way to launch pdb.post_mortem or other debug hooks

2019-05-07 Thread Windson Yang
Windson Yang added the comment: Hello, @Rémi, are you still working on this issue? -- nosy: +Windson Yang ___ Python tracker ___ ___

[issue18765] unittest needs a way to launch pdb.post_mortem or other debug hooks

2019-02-05 Thread Rémi Lapeyre
Rémi Lapeyre added the comment: @gregory.p.smith Do you think the debugHook should be added to the test case or the test runner? If we add it to the test case, how do you think the runner should tell the test case what flags have been given on the command line? I feel like adding a new class

[issue18765] unittest needs a way to launch pdb.post_mortem or other debug hooks

2019-02-04 Thread Gregory P. Smith
Change by Gregory P. Smith : -- keywords: +easy versions: +Python 3.8 -Python 3.4 ___ Python tracker ___ ___ Python-bugs-list mailin

[issue18765] unittest needs a way to launch pdb.post_mortem or other debug hooks

2019-02-04 Thread Rémi Lapeyre
Rémi Lapeyre added the comment: Hi, this is the only reason I still use pytest, I would love to be able to use only unittest and the constant copy-paste is not a great solution and is not very user friendly. I would like to wotk on this issue. StackOverflow has many example on how to overrid

[issue18765] unittest needs a way to launch pdb.post_mortem or other debug hooks

2013-08-17 Thread Michael Foord
Michael Foord added the comment: This is done in outcome.testPartExecutor. If you add it in the except clause then it is *only* called on test failure or error. If we call it unconditionally with the result (maybe a sys.exc_info tuple?) then it could have extended use cases (perhaps custom rep

[issue18765] unittest needs a way to launch pdb.post_mortem or other debug hooks

2013-08-16 Thread Gregory P. Smith
New submission from Gregory P. Smith: A few times now I've seen people write something that overrides and re-implements the unittest.TestCase run() method, copying most of the implementation but adding one feature: The ability for pdb.post_mortem() to be called after every phase of execution