[TIP] testing unittest2 plugin branch Was: How to get coverage.py and unittest2 working together?
Michael Foord
fuzzyman at voidspace.org.uk
Thu Jul 29 04:21:26 PDT 2010
On 29/07/2010 04:00, Jorge Vargas wrote:
> Sorry spoke too soon.
>
> On Wed, Jul 28, 2010 at 10:53 PM, Jorge Vargas<jorge.vargas at gmail.com> wrote:
>
>> On Wed, Jul 28, 2010 at 7:15 PM, Michael Foord
>> <fuzzyman at voidspace.org.uk> wrote:
>>
>>> On 28/07/2010 22:41, Jorge Vargas wrote:
>>>
>>>> for example the pdb plugin is currently not working as it's putting
>>>> the stop in inside unittest2, it is also doing funny things when
>>>> enabled together with checker :)
>>>>
>>>>
>>> It seems to work fine for me - even with the checker enabled. It is possible
>>> that one of my recent changes fixed it again :-o Could you try it again?
>>>
>>>
> The following config (although not logical) will make the debugger
> launch on each pyflakes warning at
> unittest2/unittest2/plugins/checker.py(135)check_file_pyflakes()
>
>
> [debugger]
> always-on = True
> errors-only = False
>
> [checker]
> always-on = True
>
Well indeed - you have configured the debugger plugin to drop you into
the debugger when a test fails or has an error. You have also switched
the checker on that generates tests that fail if your code fails pep8 or
pyflakes checking. Therefore the debugger will enter the test failures
caused by the checker...
The best thing is probably to switch the checker off for runs where you
want the debugger enabled... I guess in the future the debugger plugin
could become aware of the checker plugin and not trigger on checker
generated tests. This seems like dodgy ground to me though. (Perhaps the
checker could raise a particular kind of exception that the debugger
avoids?)
Michael
--
http://www.ironpythoninaction.com/
http://www.voidspace.org.uk/blog
READ CAREFULLY. By accepting and reading this email you agree, on behalf of your employer, to release me from all obligations and waivers arising from any and all NON-NEGOTIATED agreements, licenses, terms-of-service, shrinkwrap, clickwrap, browsewrap, confidentiality, non-disclosure, non-compete and acceptable use policies (”BOGUS AGREEMENTS”) that I have entered into with your employer, its partners, licensors, agents and assigns, in perpetuity, without prejudice to my ongoing rights and privileges. You further represent that you have the authority to release me from any BOGUS AGREEMENTS on behalf of your employer.
More information about the testing-in-python
mailing list