<div dir="ltr">Hi<br><div><div class="gmail_extra"><br><br><div class="gmail_quote">On Tue, Nov 19, 2013 at 10:43 AM, Peter Feiner <span dir="ltr"><<a href="mailto:peter@gridcentric.ca" target="_blank">peter@gridcentric.ca</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">A substantive reason for switching from mox to mock is the derelict<br>
state of mox releases. There hasn't been a release of mox in three<br>
years: the latest, mox-0.5.3, was released in 2010 [1, 2]. Moreover,<br>
in the past 3 years, substantial bugs have been fixed in upstream mox.<br>
For example, with the year-old fix to<br>
<a href="https://code.google.com/p/pymox/issues/detail?id=16" target="_blank">https://code.google.com/p/pymox/issues/detail?id=16</a>, a very nasty bug<br>
in nova would have been caught by an existing test [3].<br>
<br>
Alternatively, a copy of the upstream mox code could be added in-tree.<br>
<br></blockquote><div>Please no, I think we are in an agreement with mox3 and mock.<br><br></div><div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
[1] mox releases: <a href="https://code.google.com/p/pymox/downloads/list" target="_blank">https://code.google.com/p/pymox/downloads/list</a><br>
[2] mox on pypi: <a href="https://pypi.python.org/pypi/mox" target="_blank">https://pypi.python.org/pypi/mox</a><br>
[3] see comments 5 and 6 in <a href="https://bugs.launchpad.net/nova/+bug/1251792" target="_blank">https://bugs.launchpad.net/nova/+bug/1251792</a><br>
<div class="HOEnZb"><div class="h5"><br>
On Wed, Nov 13, 2013 at 2:24 PM, Matt Riedemann<br>
<<a href="mailto:mriedem@linux.vnet.ibm.com">mriedem@linux.vnet.ibm.com</a>> wrote:<br>
><br>
><br>
> On 11/12/2013 5:04 PM, Chuck Short wrote:<br>
>><br>
>><br>
>><br>
>><br>
>> On Tue, Nov 12, 2013 at 4:49 PM, Mark McLoughlin <<a href="mailto:markmc@redhat.com">markmc@redhat.com</a><br>
>> <mailto:<a href="mailto:markmc@redhat.com">markmc@redhat.com</a>>> wrote:<br>
>><br>
>> On Tue, 2013-11-12 at 16:42 -0500, Chuck Short wrote:<br>
>> ><br>
>> > Hi<br>
>> ><br>
>> ><br>
>> > On Tue, Nov 12, 2013 at 4:24 PM, Mark McLoughlin<br>
>> <<a href="mailto:markmc@redhat.com">markmc@redhat.com</a> <mailto:<a href="mailto:markmc@redhat.com">markmc@redhat.com</a>>><br>
>><br>
>> > wrote:<br>
>> > On Tue, 2013-11-12 at 13:11 -0800, Shawn Hartsock wrote:<br>
>> > > Maybe we should have some 60% rule... that is: If you<br>
>> change<br>
>> > more than<br>
>> > > half of a test... you should *probably* rewrite the test<br>
>> in<br>
>> > Mock.<br>
>> ><br>
>> ><br>
>> > A rule needs a reasoning attached to it :)<br>
>> ><br>
>> > Why do we want people to use mock?<br>
>> ><br>
>> > Is it really for Python3? If so, I assume that means we've<br>
>> > ruled out the<br>
>> > python3 port of mox? (Ok by me, but would be good to hear<br>
>> why)<br>
>> > And, if<br>
>> > that's the case, then we should encourage whoever wants to<br>
>> > port mox<br>
>> > based tests to mock.<br>
>> ><br>
>> ><br>
>> ><br>
>> > The upstream maintainer is not going to port mox to python3 so we<br>
>> have<br>
>> > a fork of mox called mox3. Ideally, we would drop the usage of mox<br>
>> in<br>
>> > favour of mock so we don't have to carry a forked mox.<br>
>><br>
>> Isn't that the opposite conclusion you came to here:<br>
>><br>
>><br>
>> <a href="http://lists.openstack.org/pipermail/openstack-dev/2013-July/012474.html" target="_blank">http://lists.openstack.org/pipermail/openstack-dev/2013-July/012474.html</a><br>
>><br>
>> i.e. using mox3 results in less code churn?<br>
>><br>
>> Mark.<br>
>><br>
>><br>
>><br>
>> Yes that was my original position but I though we agreed in thread<br>
>> (further on) that we would use mox3 and then migrate to mock further on.<br>
>><br>
>> Regards<br>
>> chuck<br>
>><br>
>><br>
>> _______________________________________________<br>
>> OpenStack-dev mailing list<br>
>> <a href="mailto:OpenStack-dev@lists.openstack.org">OpenStack-dev@lists.openstack.org</a><br>
>> <a href="http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-dev" target="_blank">http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-dev</a><br>
>><br>
><br>
> So it sounds like we're good with using mox for new tests again? Given Chuck<br>
> got it into global-requirements here:<br>
><br>
> <a href="https://github.com/openstack/requirements/commit/998dda263d7c7881070e3f16e4523ddcd23fc36d" target="_blank">https://github.com/openstack/requirements/commit/998dda263d7c7881070e3f16e4523ddcd23fc36d</a><br>
><br>
> We can stave off the need to transition everything from mox to mock?<br>
><br>
> I can't seem to find the nova blueprint to convert everything from mox to<br>
> mock, maybe it was obsoleted already.<br>
><br>
> Anyway, if mox(3) is OK and we don't need to use mock, it seems like we<br>
> could add something to the developer guide here because I think this<br>
> question comes up frequently:<br>
><br>
> <a href="http://docs.openstack.org/developer/nova/devref/unit_tests.html" target="_blank">http://docs.openstack.org/developer/nova/devref/unit_tests.html</a><br>
><br>
> Does anyone disagree?<br>
><br>
> BTW, I care about this because I've been keeping in mind the mox/mock<br>
> transition when doing code reviews and giving a -1 when new tests are using<br>
> mox (since I thought that was a no-no now).<br>
> --<br>
><br>
> Thanks,<br>
><br>
> Matt Riedemann<br>
><br>
><br>
><br>
> _______________________________________________<br>
> OpenStack-dev mailing list<br>
> <a href="mailto:OpenStack-dev@lists.openstack.org">OpenStack-dev@lists.openstack.org</a><br>
> <a href="http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-dev" target="_blank">http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-dev</a><br>
<br>
_______________________________________________<br>
OpenStack-dev mailing list<br>
<a href="mailto:OpenStack-dev@lists.openstack.org">OpenStack-dev@lists.openstack.org</a><br>
<a href="http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-dev" target="_blank">http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-dev</a><br>
</div></div></blockquote></div><br></div></div></div>