<br><br><div class="gmail_quote">On Sun, Oct 21, 2012 at 10:00 PM, Glyph <span dir="ltr">&lt;<a href="mailto:glyph@twistedmatrix.com" target="_blank">glyph@twistedmatrix.com</a>&gt;</span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<div style="word-wrap:break-word"><div class="im"><div><div>On Oct 21, 2012, at 7:45 PM, Julian Berman &lt;<a href="mailto:julian@grayvines.com" target="_blank">julian@grayvines.com</a>&gt; wrote:</div><br><blockquote type="cite">
<span style="font-family:Menlo;font-size:medium;font-style:normal;font-variant:normal;font-weight:normal;letter-spacing:normal;line-height:normal;text-align:-webkit-auto;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px;display:inline!important;float:none">The *benefit* though for me in having mock present is that it decreases the</span><br style="font-family:Menlo;font-size:medium;font-style:normal;font-variant:normal;font-weight:normal;letter-spacing:normal;line-height:normal;text-align:-webkit-auto;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px">
<span style="font-family:Menlo;font-size:medium;font-style:normal;font-variant:normal;font-weight:normal;letter-spacing:normal;line-height:normal;text-align:-webkit-auto;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px;display:inline!important;float:none">lines of code necessary to write stubs and mocks. While doing so is not really</span><br style="font-family:Menlo;font-size:medium;font-style:normal;font-variant:normal;font-weight:normal;letter-spacing:normal;line-height:normal;text-align:-webkit-auto;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px">
<span style="font-family:Menlo;font-size:medium;font-style:normal;font-variant:normal;font-weight:normal;letter-spacing:normal;line-height:normal;text-align:-webkit-auto;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px;display:inline!important;float:none">that difficult anyhow, it *is* just a bit more clutter to do so without mock,</span><br style="font-family:Menlo;font-size:medium;font-style:normal;font-variant:normal;font-weight:normal;letter-spacing:normal;line-height:normal;text-align:-webkit-auto;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px">
<span style="font-family:Menlo;font-size:medium;font-style:normal;font-variant:normal;font-weight:normal;letter-spacing:normal;line-height:normal;text-align:-webkit-auto;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px;display:inline!important;float:none">and the extra 3 or 4 lines mean that in more than one instance I have found</span><br style="font-family:Menlo;font-size:medium;font-style:normal;font-variant:normal;font-weight:normal;letter-spacing:normal;line-height:normal;text-align:-webkit-auto;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px">
<span style="font-family:Menlo;font-size:medium;font-style:normal;font-variant:normal;font-weight:normal;letter-spacing:normal;line-height:normal;text-align:-webkit-auto;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px;display:inline!important;float:none">myself pick a different strategy than I would have because of the extra lines</span><br style="font-family:Menlo;font-size:medium;font-style:normal;font-variant:normal;font-weight:normal;letter-spacing:normal;line-height:normal;text-align:-webkit-auto;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px">
<span style="font-family:Menlo;font-size:medium;font-style:normal;font-variant:normal;font-weight:normal;letter-spacing:normal;line-height:normal;text-align:-webkit-auto;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px;display:inline!important;float:none">of code that clutter the test method.</span><br style="font-family:Menlo;font-size:medium;font-style:normal;font-variant:normal;font-weight:normal;letter-spacing:normal;line-height:normal;text-align:-webkit-auto;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px">
</blockquote></div><br></div><div>This seems like a pretty small benefit; adding a new dependency affects lots of people and introduces a new point of failure in the installation process, especially for Windows users who already have a devil of a time getting Twisted installed.</div>
</div></blockquote><div> </div><div>I never have much trouble, of course I always have a C compiler installed and never use the Windows installer for Twisted any more.  The main issue I have with installing Twisted, is that in order to use any of the command like tools I have to go in and muck with the files (I think they just have to be renamed...been a while since I&#39;ve done it), since Twisted uses the old distutils &quot;script&quot; method of installing them, rather than using setuptools/sitribute or distutils2/packaging or whatever.</div>
<div><br></div><div>This means the various command line tools get installed (IIRC and if my info is up to date) without file extensions, which is fine in a Unixy environment, but don&#39;t work a&#39;tall on Windows.</div>
<div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div style="word-wrap:break-word"><div></div><div>Also I don&#39;t particularly like the testing style associated with Mock.  I think it might discourage us yet further from writing verified fakes, i.e. supported in-memory implementations of things like IReactorTCP, that have somewhat intricate behavior that&#39;s tedious to emulate with Mock.</div>
<div><br></div></div></blockquote><div><br></div><div>My experience with mock is that when you need it it&#39;s really really obvious, and if you don&#39;t, you shouldn&#39;t start using it, as it starts to become a crutch.</div>
<div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div style="word-wrap:break-word"><div></div><div>Personally I&#39;m -0.  Don&#39;t let that stop you from cooking up a patch that would include it though, I might be in the minority here.</div>
<span class="HOEnZb"><font color="#888888"><div><br></div><div>-glyph</div><div><br></div></font></span></div></blockquote></div><br><div>Kevin Horn</div>