Re: [Twisted-Python] Adding mock as a test suite dependency

2012-10-22 Thread Julian Berman
From: exar...@twistedmatrix.com > Subject: Re: [Twisted-Python] Adding mock as a test suite dependency > > On 03:00 am, gl...@twistedmatrix.com wrote: > >Also I don't particularly like the testing style associated with Mock. > >I think it might discourage us yet fur

Re: [Twisted-Python] Adding mock as a test suite dependency

2012-10-22 Thread Kevin Horn
On Sun, Oct 21, 2012 at 10:00 PM, Glyph wrote: > On Oct 21, 2012, at 7:45 PM, Julian Berman wrote: > > The *benefit* though for me in having mock present is that it decreases the > lines of code necessary to write stubs and mocks. While doing so is not > really > that difficult anyhow, it *is* j

Re: [Twisted-Python] Adding mock as a test suite dependency

2012-10-22 Thread Kevin Horn
On Sun, Oct 21, 2012 at 9:45 PM, Julian Berman wrote: > Hi. > > I'd like to gauge any interest in (or resistance towards) adding mock > (http://www.voidspace.org.uk/python/mock/mock.html) as a dependency for > the > test suite. > > In short, while I don't necessarily feel strongly about behavior

Re: [Twisted-Python] Adding mock as a test suite dependency

2012-10-22 Thread Glyph
On Oct 22, 2012, at 5:47 AM, Itamar Turner-Trauring wrote: > A testing dependency isn't quite as problematic as a regular dependency; > you'd only need to install it if you wanted to run Twisted's test suite, > which probably most users do not bother with. This actually strikes me as a strong

Re: [Twisted-Python] Adding mock as a test suite dependency

2012-10-22 Thread David Reid
On Mon, Oct 22, 2012 at 9:57 AM, Laurens Van Houtven <_...@lvh.cc> wrote: > So, mock does have an autospec mode, which is not the default, but does > result in eg methods undefined on the parent raising AttributeError. > It does, but it won't for instance know that for: mock_agent = mock.Mock

Re: [Twisted-Python] Adding mock as a test suite dependency

2012-10-22 Thread Laurens Van Houtven
So, mock does have an autospec mode, which is not the default, but does result in eg methods undefined on the parent raising AttributeError. I don't know if there's a way to generate a mock from an interface: particularly the fact that interface methods don't have "self" in their signature might t

Re: [Twisted-Python] Adding mock as a test suite dependency

2012-10-22 Thread exarkun
On 03:00 am, gl...@twistedmatrix.com wrote: >On Oct 21, 2012, at 7:45 PM, Julian Berman >wrote: >>The *benefit* though for me in having mock present is that it >>decreases the >>lines of code necessary to write stubs and mocks. While doing so is >>not really >>that difficult anyhow, it *is* jus

Re: [Twisted-Python] Adding mock as a test suite dependency

2012-10-22 Thread Jasper St. Pierre
On Sun, Oct 21, 2012 at 11:00 PM, Glyph wrote: > On Oct 21, 2012, at 7:45 PM, Julian Berman wrote: > > 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 alr

Re: [Twisted-Python] Adding mock as a test suite dependency

2012-10-22 Thread Itamar Turner-Trauring
On Sun, Oct 21, 2012 at 11:00 PM, Glyph wrote: > > 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 instal

Re: [Twisted-Python] Adding mock as a test suite dependency

2012-10-21 Thread Glyph
On Oct 21, 2012, at 7:45 PM, Julian Berman wrote: > The *benefit* though for me in having mock present is that it decreases the > lines of code necessary to write stubs and mocks. While doing so is not really > that difficult anyhow, it *is* just a bit more clutter to do so without mock, > and th

[Twisted-Python] Adding mock as a test suite dependency

2012-10-21 Thread Julian Berman
Hi. I'd like to gauge any interest in (or resistance towards) adding mock (http://www.voidspace.org.uk/python/mock/mock.html) as a dependency for the test suite. In short, while I don't necessarily feel strongly about behavior vs. state based verification being preferred in a general sense, I thi