[Twisted-Python] patch for t.p.logger.SyslogObserver (was #7549)

Glyph Lefkowitz glyph at twistedmatrix.com
Mon Aug 18 13:19:11 MDT 2014


On Aug 18, 2014, at 10:50 AM, Roberto Polli <roberto.polli at babel.it> wrote:

> Hi everybody,
> 
> I found some time for adding a stub of SyslogObserver to the new t.p.logger.
> 
> https://github.com/ioggstream/twisted/commit/991156e1124d61ad26da0be12123079ffc45764c
> 
> Feedback welcome!
> 
> Peace,
> R.

For starters, DummyFile looks unnecessary.  You've got tests that make sure it isn't written to, but you just construct one and you don't pass it to anything, so of course it doesn't get written to, why would it?

This is the sort of test one might write if one were writing tests after the fact, rather than test-driven as Twisted's process recommends.  You weren't writing tests last, were you? ;-)

It also looks like the sort of thing you copied and pasted out of test_file.py.  Please don't copy and paste; if you want to import a helper from elsewhere in the test suite, just import it.

Is this otherwise ready for review?

-glyph





More information about the Twisted-Python mailing list