ajack       2004/01/09 15:28:40

  Modified:    python/gump/output statsdb.py
               python/gump/test pyunit.py stats.py
               python/gump/model stats.py
  Log:
  If at first...
  
  Revision  Changes    Path
  1.10      +3 -4      jakarta-gump/python/gump/output/statsdb.py
  
  Index: statsdb.py
  ===================================================================
  RCS file: /home/cvs/jakarta-gump/python/gump/output/statsdb.py,v
  retrieving revision 1.9
  retrieving revision 1.10
  diff -u -r1.9 -r1.10
  --- statsdb.py        9 Jan 2004 23:02:32 -0000       1.9
  +++ statsdb.py        9 Jan 2004 23:28:40 -0000       1.10
  @@ -238,7 +238,6 @@
       def putDate(self,key,val=0):
           self.putInt(key,val)
           
  -  
       def loadStatistics(self,workspace):
           log.debug('--- Loading Statistics')
                     
  
  
  
  1.16      +6 -7      jakarta-gump/python/gump/test/pyunit.py
  
  Index: pyunit.py
  ===================================================================
  RCS file: /home/cvs/jakarta-gump/python/gump/test/pyunit.py,v
  retrieving revision 1.15
  retrieving revision 1.16
  diff -u -r1.15 -r1.16
  --- pyunit.py 9 Jan 2004 23:18:02 -0000       1.15
  +++ pyunit.py 9 Jan 2004 23:28:40 -0000       1.16
  @@ -118,7 +118,7 @@
               self.raiseIssue(['Ought evaluate as in', message, object, sequence])
               
       def assertSubstring(self,message,subString,mainString):
  -        if not -1 == mainSequence.find(subString):
  +        if not -1 == mainString.find(subString):
               self.raiseIssue(['Ought evaluate as in', message, object, sequence])
               
       def assertNotIn(self,message,object,sequence):
  @@ -126,9 +126,8 @@
               self.raiseIssue(['Ought NOT evaluate as in', message, object, sequence])
   
       def assertNotSubstring(self,message,subString,mainString):
  -        if -1 == mainSequence.find(subString):
  -            self.raiseIssue(['Ought evaluate as in', message, object, sequence])
  -            
  +        if -1 == mainString.find(subString):
  +            self.raiseIssue(['Ought evaluate as in', message, object, sequence])    
        
       
       def assertLengthAbove(self,message,object,length):
           if not len(object) >= length:
  
  
  
  1.7       +13 -8     jakarta-gump/python/gump/test/stats.py
  
  Index: stats.py
  ===================================================================
  RCS file: /home/cvs/jakarta-gump/python/gump/test/stats.py,v
  retrieving revision 1.6
  retrieving revision 1.7
  diff -u -r1.6 -r1.7
  --- stats.py  9 Jan 2004 23:18:02 -0000       1.6
  +++ stats.py  9 Jan 2004 23:28:40 -0000       1.7
  @@ -119,6 +119,9 @@
           ps1p = ps1.prereqs
           ps1.prereqs += 1
           
  +        ps1seq = ps1.sequenceInState
  +        ps1.sequenceInState += 1
  +        
           # Put        
           self.statsDB.putProjectStats(ps1)
           self.statsDB.putModuleStats(ms1)
  @@ -128,12 +131,14 @@
           ps2=self.statsDB.getProjectStats(self.project1.getName())
           ms2=self.statsDB.getModuleStats(self.module1.getName())
           rs2=self.statsDB.getRepositoryStats(self.repo1.getName())
  +            
  +        if not os.name == 'dos' and not os.name == 'nt':  
  +            self.assertGreater('Incremented Successes', ps2.successes, ps1s )
  +            self.assertGreater('Incremented Failures', ps2.failures, ps1f )
  +            self.assertGreater('Incremented Prereqs', ps2.prereqs, ps1p )
  +            self.assertGreater('Incremented SequenceInState', ps2.sequenceInState, 
ps1seq )
           
  -        self.assertGreater('Incremented Successes', ps2.successes, ps1s )
  -        self.assertGreater('Incremented Successes', ps2.failures, ps1f )
  -        self.assertGreater('Incremented Successes', ps2.prereqs, ps1p )
  -        
  -        print str(ps1s) + ' : ' + str(ps1f) + ' : ' + str(ps1p)
  +        print str(ps1s) + ' : ' + str(ps1f) + ' : ' + str(ps1p) + ' : ' + 
str(ps1seq)
           
           self.statsDB.sync()
           
  
  
  
  1.5       +9 -3      jakarta-gump/python/gump/model/stats.py
  
  Index: stats.py
  ===================================================================
  RCS file: /home/cvs/jakarta-gump/python/gump/model/stats.py,v
  retrieving revision 1.4
  retrieving revision 1.5
  diff -u -r1.4 -r1.5
  --- stats.py  9 Jan 2004 23:11:07 -0000       1.4
  +++ stats.py  9 Jan 2004 23:28:40 -0000       1.5
  @@ -143,6 +143,12 @@
               elif statable.isPrereqFailed():                        
                   s.prereqs  += 1
               
  +        elif statable.isFailure():
  +            self.failures += 1
  +            
  +        elif statable.isPrereq():
  +            self.prereqs += 1
  +            
           #
           # Deal with states & changes...
           #
  
  
  

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to