예제 #1
0
 def sanityCheckAndReport(self, year, month, res):
     setReportStr = "year = %d, month = %d, res = %d" % (year, month, res)
     sanityCheckReportString = 'Data set sanity check failed for %s, expected %d entries got %d'
     if (not self.checkLoadable(year, month, res)):
         print 'Data set %s does not exist' % setReportStr
         return
     if (not self.hasDataSet(year, month, res)):
         print 'Have not yet loaded data for %s' %setReportStr
     if (not self.sanityCheck(year, month, res)):
         print sanityCheckReportString % (setReportStr, fullSetSize(res), len(self.data[year][month][res]))
예제 #2
0
 def sanityCheck(self, year, month, res):
     if self.checkLoadable(year, month, res):
         if (self.hasDataSet(year, month, res)):
             return fullSetSize(res) == len(self.data[year][month][res])
         else: return True
     else: return False