def test_setup(self): # Clean out the work directory. if os.path.exists(self.work_dir): shutil.rmtree(self.work_dir) # Download data for e in experiments.keys(): yield self.check_download_data, e # Do build models = list(set([v[0][0] for v in experiments.values()])) for m in models: print(m) yield self.check_build, m
def main(): my_dir = os.path.dirname(os.path.realpath(__file__)) work_dir = os.path.join(my_dir, '../', 'work') checksum_dir = os.path.join(my_dir, 'checksums') regex = re.compile(r'\[chksum\]\s+(.*)\s+(-?[0-9]+)$') for test_name in test_specs.keys(): model_out = os.path.join(work_dir, test_name, 'fms.out') checksum_file = os.path.join(checksum_dir, test_name + '.txt') with open(model_out, 'r') as m_f: with open(checksum_file, 'w') as c_f: for line in m_f: m = regex.match(line) if m is not None: print(m.group(0), file=c_f)
def test_experiments(self): for k in experiments.keys(): yield self.check_run_output, k
def test_checksums(self): for k in test_specs.keys(): yield self.check_run, k
def test_experiments(self): for k in test_specs.keys(): yield self.check_run, k