[openstack-dev] [nova] Do we have some guidelines for mock, stub, mox when writing unit test?

Shawn Hartsock hartsocks at vmware.com
Tue Nov 12 22:10:03 UTC 2013


So the real argument for Mock over Mox is that Mock is part of the stdlib in Python 3.3 ... that seems like a pretty sound argument to me.

# Shawn Hartsock


----- Original Message -----
> From: "Ben Nemec" <openstack at nemebean.com>
> To: openstack-dev at lists.openstack.org
> Sent: Tuesday, November 12, 2013 4:41:47 PM
> Subject: Re: [openstack-dev]	[nova] Do we have some guidelines for mock,  stub, mox when writing unit test?
> 
> On 2013-11-12 15:27, Shawn Hartsock wrote:
> > Good point.
> > 
> > I assume someone made a comparison similar to this:
> > * http://garybernhardt.github.io/python-mock-comparison/
> > 
> > ... and evangelized a choice. I had assumed that Mock vs mox was not
> > merely based on Python3 support but had something to do with Mock
> > versus Mox. Does anyone have that context in their head? Would they
> > mind sharing it?
> 
> Not in my head, but the internet remembers everything :-)
> 
> http://lists.openstack.org/pipermail/openstack-dev/2013-July/012474.html
> 
> In short, the majority of respondents liked Mock better, it seems to be
> more widely used, and Mock is part of the stdlib in Python 3.3.
> 
> -Ben
> 
> _______________________________________________
> OpenStack-dev mailing list
> OpenStack-dev at lists.openstack.org
> http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-dev
> 



More information about the OpenStack-dev mailing list