Change in vdsm[master]: tests: Add simple mocking library

smizrahi at redhat.com smizrahi at redhat.com
Sun Dec 15 15:56:32 UTC 2013


Saggi Mizrahi has posted comments on this change.

Change subject: tests: Add simple mocking library
......................................................................


Patch Set 1:

Ignoring the fact that you have not answered any of my comments I will sat what I think about the linked article as I assume that is what you want me to do.

You could have done the comparison against the article yourself and spared me the work of pointing out why it is irrelevant to my comments but unlike you I would respect your time and point it out for you.

Through I use the terms stubs and mocks interchangeably I understand the difference. But thanks for making sure of that.

The article puts "Coupling Tests to Implementation" as a plus which I personally disagree with and was the main point of my arguments. Thus linking it was kind of pointless.

The article assumes you are using languages like Java\C# where creating a method or a class is hard and costly.
It usually requires a new file to put the mock function\class in and has tons of boilerplate.

As I addressed in my comments this is a problem that does not plague python as it's syntax in light and flexible.
Creating classes and methods is painless and can happen mid functions so using the mock objects DSL does not add brevity and celerity as it supposed to in Java\C# but instead does the complete opposite.

The point of using mock objects is to prevent use of the real thing. Since python is duck typed there is no reason to have a mock framework.

I was never against creating mock objects. I was against verifying input and using a "framework" since in python it is useless.

-- 
To view, visit http://gerrit.ovirt.org/21155
To unsubscribe, visit http://gerrit.ovirt.org/settings

Gerrit-MessageType: comment
Gerrit-Change-Id: Ia5d874f553b6a983652ed745d7d8554716e7a15e
Gerrit-PatchSet: 1
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Nir Soffer <nsoffer at redhat.com>
Gerrit-Reviewer: Allon Mureinik <amureini at redhat.com>
Gerrit-Reviewer: Dan Kenigsberg <danken at redhat.com>
Gerrit-Reviewer: Douglas Schilling Landgraf <dougsland at redhat.com>
Gerrit-Reviewer: Federico Simoncelli <fsimonce at redhat.com>
Gerrit-Reviewer: Nir Soffer <nsoffer at redhat.com>
Gerrit-Reviewer: Saggi Mizrahi <smizrahi at redhat.com>
Gerrit-Reviewer: Sergey Gotliv <sgotliv at redhat.com>
Gerrit-Reviewer: Yaniv Bronhaim <ybronhei at redhat.com>
Gerrit-Reviewer: mooli tayer <mtayer at redhat.com>
Gerrit-Reviewer: oVirt Jenkins CI Server
Gerrit-HasComments: No


More information about the vdsm-patches mailing list