[Buildbot-commits] [Buildbot] #1011: Add $(property:~replacement) syntax that turns anything false into replacement, too

Buildbot buildbot-devel at lists.sourceforge.net
Tue Oct 26 19:31:59 UTC 2010


#1011: Add $(property:~replacement) syntax that turns anything false into
replacement, too
------------------------+---------------------------------------------------
Reporter:  dustin       |        Owner:  dustin  
    Type:  enhancement  |       Status:  reopened
Priority:  major        |    Milestone:  0.8.2   
 Version:  0.8.1        |   Resolution:          
Keywords:               |  
------------------------+---------------------------------------------------

Comment(by dustin):

 OK, here's the new tests; this turns anything that Python sees as false
 into the replacement:
 {{{
 #!text/x-python
     def testColonTildeSet(self):
         self.assertEqual(self.pm['prop_str:~missing'], 'a-string')

     def testColonTildeNone(self):
         # None is special-cased *differently* for ~:
         self.assertEqual(self.pm['prop_none:~missing'], 'missing')

     def testColonTildeZero(self):
         self.assertEqual(self.pm['prop_zero:~missing'], 'missing')

     def testColonTildeOne(self):
         self.assertEqual(self.pm['prop_one:~missing'], 1)

     def testColonTildeFalse(self):
         self.assertEqual(self.pm['prop_false:~missing'], 'missing')

     def testColonTildeTrue(self):
         self.assertEqual(self.pm['prop_true:~missing'], True)

     def testColonTildeEmpty(self):
         self.assertEqual(self.pm['prop_empty:~missing'], 'missing')

     def testColonTildeUnset(self):
         self.assertEqual(self.pm['prop_nosuch:~missing'], 'missing')
 }}}

-- 
Ticket URL: <http://buildbot.net/trac/ticket/1011#comment:8>
Buildbot <http://buildbot.net/>
Buildbot: build/test automation


More information about the Commits mailing list