def confirmContent(self):
'''
Confirms that all information is the same, ignoring record order
'''
dr = StationDataRequestor()
wxData = dr.getMonthlyWxSummaryByYear(climateStations = self.climateStations,
climateParameters = self.climateParameters, reduceCodes = self.reduceCodes
,sdate = self.sdate, edate = self.edate, maxMissing = self.maxMissing,
includeNormals = self.includeNormals, includeNormalDepartures = self.includeNormalDepartures)
wxData.export('temp.csv')
infile = open('temp.csv','r')
testData = infile.read()
refDataFile = open(Test_StationDataRequestor_getMonthlyWxSummaryByYear.rootFolder + self.refDataFile, 'r')
refData = refDataFile.read()
infile.close()
refDataFile.close()
os.remove('temp.csv')
self.result = list(numpy.setdiff1d(refData.split('/n'), testData.split('/n')))
评论列表
文章目录