[Twisted-Python] Re: [Twisted-commits] tests for active

Bob Ippolito bob at redivi.com
Tue May 13 14:12:47 MDT 2003


On Tuesday, May 13, 2003, at 14:02 America/New_York, Itamar 
Shtull-Trauring wrote:

>> +    def testActive(self):
>> +        dcall = reactor.callLater(0, lambda: None)
>> +        self.assertEquals(dcall.active(), True)
>> +        reactor.iterate()
>> +        self.assertEquals(dcall.active(), False)
>> +
>
> Can you please not use True/False/bool in tests? Yes, I know you can
> import from compat, but half the time people'll forget to do that and
> we'll have to go and fix the tests. Not everyone runs 2.2.2.

I'd almost consider having twisted/__init__.py just set those into 
builtins, even though that's extremely evil.. It's SUCH a common 
mistake these days.

-bob





More information about the Twisted-Python mailing list