def run(self): source_pathnames = self.glob_source_pathnames() print ProductVerifier.get_current_time(), \ "found " + str(len(source_pathnames)) + " source files in '" + self.source_dirpath + "'" for source_pathname in source_pathnames: print ProductVerifier.get_current_time(), "source pathname:", source_pathname report_filename = path.basename(source_pathname) + ".json" report_pathname = path.join(self.report_dirpath, report_filename) print ProductVerifier.get_current_time(), "report pathname:", report_pathname verifier = ProductVerifier(source_pathname, report_pathname) verifier.verify()
def run(self): source_pathnames = self.glob_source_pathnames() print ProductVerifier.get_current_time(), \ "found " + str(len(source_pathnames)) + " source files in '" + self.source_dirpath + "'" for source_pathname in source_pathnames: print ProductVerifier.get_current_time( ), "source pathname:", source_pathname report_filename = path.basename(source_pathname) + ".json" report_pathname = path.join(self.report_dirpath, report_filename) print ProductVerifier.get_current_time( ), "report pathname:", report_pathname verifier = ProductVerifier(source_pathname, report_pathname) verifier.verify()
def test_verify(self): verifier = ProductVerifier('testdata/20100505121116-ESACCI-L2P_GHRSST-SSTskin-AVHRRMTA_G-EXP1.2-v02.0-fv1.0.nc') verifier.verify() expected_report = ProductVerifier.load_report('testdata/report.json') self.assertEquals(expected_report, verifier.get_report())