Commit a6ee1e5f authored by miaecle's avatar miaecle
Browse files

fix style

parent 9290c70e
Loading
Loading
Loading
Loading
+8 −6
Original line number Diff line number Diff line
@@ -28,7 +28,8 @@ class TestMolnet(unittest.TestCase):
    model = 'graphconvreg'
    split = 'random'
    out_path = self.current_dir
    dc.molnet.run_benchmark(datasets, str(model), split=split, out_path=out_path)
    dc.molnet.run_benchmark(
        datasets, str(model), split=split, out_path=out_path)
    with open(os.path.join(out_path, 'results.csv'), 'r') as f:
      reader = csv.reader(f)
      for lastrow in reader:
@@ -44,7 +45,8 @@ class TestMolnet(unittest.TestCase):
    model = 'tf_regression'
    split = 'random'
    out_path = self.current_dir
    dc.molnet.run_benchmark(datasets, str(model), split=split, out_path=out_path)
    dc.molnet.run_benchmark(
        datasets, str(model), split=split, out_path=out_path)
    with open(os.path.join(out_path, 'results.csv'), 'r') as f:
      reader = csv.reader(f)
      for lastrow in reader:
@@ -60,13 +62,13 @@ class TestMolnet(unittest.TestCase):
    model = 'tf'
    split = 'random'
    out_path = self.current_dir
    dc.molnet.run_benchmark(datasets, str(model), split=split, out_path=out_path)
    dc.molnet.run_benchmark(
        datasets, str(model), split=split, out_path=out_path, test=True)
    with open(os.path.join(out_path, 'results.csv'), 'r') as f:
      reader = csv.reader(f)
      for lastrow in reader:
        pass
      assert lastrow[-4] == model
      assert lastrow[-5] == 'valid'
      assert float(lastrow[-3]) > 0.75
      assert lastrow[-5] == 'test'
      assert float(lastrow[-3]) > 0.7
    os.remove(os.path.join(out_path, 'results.csv'))