Thanks for offering to make the changes.  I certainly don't mind if you want
to do it.  I imagine you're very busy, though.  Let me know if you have the
time and desire.  Otherwise, I can do it.

So, do you want to avoid using mock all together or can we just avoid using
the decorator stuff?  The way I was thinking of fixing the tests is to move
the test cases that need patching to their own test classes and do the
monkey patching in the setUp() function and undo the monkey patching the
tearDown() function.  That should get rid of the need for decorators.  If I
can still use mock objects, the rest of the test should be good to go.

What do you think?

Roger

On Mon, Nov 23, 2009 at 5:34 PM, Mike Naberezny <[email protected]>wrote:

> Roger Hoover wrote:
>
>> Do you mind if I conditionalize the mock tests?  Since they are only unit
>> tests and not required for runtime, it shouldn't hurt anything.
>>
>> There are already tests in the codebase that have this structure:
>>
>> if sys.version_info[:2] >= (2, 4):
>>  #define test case here
>>
>
> I would prefer not to do this if we can avoid it.
>
> There is one conditional like that in the suite already but there's not a
> way around the existing one.  It's a test for supervisord's --profile option
> (a development aid).  In that case, supervisord is using features of the
> profile module from the stdlib that weren't available before 2.4.  This is
> the only test that's conditional by Python version to my knowledge.
>
> I know that you have already done a lot of work on this patch and we
> appreciate it.  If it will help, I will volunteer to make the changes.
>
>
> Thanks,
> Mike
>
> --
> Mike Naberezny
> Maintainable Software
> http://maintainable.com
>
_______________________________________________
Supervisor-users mailing list
[email protected]
http://lists.supervisord.org/mailman/listinfo/supervisor-users

Reply via email to