[Twisted-Python] twisted.news cleanups and tests

Jp Calderone exarkun at intarweb.us
Sat Apr 12 17:50:53 EDT 2003


On Fri, Apr 11, 2003 at 04:09:16PM +0200, Neil Blakey-Milner wrote:
> On Thu 2003-04-10 (23:35), Neil Blakey-Milner wrote:
> > I'd like to know what people think about the following patch and tests.
> > 
> > These are my first tests for Twisted, so I'm not sure whether I'm
> > stepping over any style rules.
> > 

  Niel,

   Thanks!  I've neglected t.news for too long.  It looks like there are
some good fixes in here.

    I notice there's a fix for parsing headers with continuations included
here too, which is cool.  I don't think I was even aware of such things when
I wrote the code originally - what seems apparent to me now, though, is that
Article either shouldn't exist at all, or that it should grow into (and move
somewhere appropriate for) a fully-fledged, asynchronous message parser that
can be used throughout Twisted wherever email-like messages need to be dealt
with.

    In the test cases, you also used assert_() (but just once, I assume it
was an oversight), which shouldn't be access directly by tests cases, so I
changed this to a failUnless().  Also, I personally make it a point to turn
string module calls into string method calls when cleaning up code, and so
have done this as well.

    All in all, nice work.

  Jp 

-- 
A sad spectacle.  If they be inhabited, what a scope for misery 
and folly.  If they be not inhabited, what a waste of space.
                -- Thomas Carlyle, looking at the stars
-- 
 up 23 days, 17:01, 4 users, load average: 0.00, 0.02, 0.02
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: not available
Url : http://twistedmatrix.com/pipermail/twisted-python/attachments/20030412/f70f5746/attachment.pgp 


More information about the Twisted-Python mailing list