[Openstack] Test Dependencies
Mark Gius
mark at markgius.com
Fri Mar 2 03:03:50 UTC 2012
Apologies to Maru for the double-email. Left out the list by mistake.
When you say "non-replay mocking," are you talking about ensuring that a
particular function is not called, or replacing a function/whatever with a
lambda that doesn't care if it gets called or how often it gets called but
still shims out say..a network request or whatever.
The first is completely supported by mox and the second is just shimming in
a lambda with some extra bookkeeping (which python 2.7/unittest2 makes
significantly easier with the addCleanup function).
Mark
On Thu, Mar 1, 2012 at 5:12 PM, Maru Newby <mnewby at internap.com> wrote:
> Is there any interest in adding unittest2 to the test dependencies for
> openstack projects? I have found its enhanced assertions and 'with
> self.assertRaises' very useful in writing tests. I see there have been
> past bugs that mentioned unittest2, and am wondering if the reasons for not
> adopting it still stand.
>
> Separately, is the use of mox open to discussion? mock was recently added
> as a dependency to quantum to perform library patching, which isn't
> supported by mox as far as I know. The ability to do non-replay mocking is
> another useful feature of mock. I'm not suggesting that mox be replaced,
> but am wondering if mock could be an additional dependency and used when
> the functionality provided by mox falls short.
>
> Thanks,
>
>
> Maru
> _______________________________________________
> Mailing list: https://launchpad.net/~openstack
> Post to : openstack at lists.launchpad.net
> Unsubscribe : https://launchpad.net/~openstack
> More help : https://help.launchpad.net/ListHelp
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openstack.org/pipermail/openstack/attachments/20120301/e173c41a/attachment.html>
More information about the Openstack
mailing list