Skip to content

Commit

Permalink
black format
Browse files Browse the repository at this point in the history
  • Loading branch information
Andrewq11 committed Nov 13, 2024
1 parent 3a10b45 commit 03a1a5f
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions tests/test_datamodule.py
Original file line number Diff line number Diff line change
Expand Up @@ -25,8 +25,9 @@

TEMP_CACHE_DATA_PATH = "tests/temp_cache_0000"


class test_DataModule(ut.TestCase):

def test_ogb_datamodule(self):
# other datasets are too large to be tested
dataset_names = ["ogbg-molhiv", "ogbg-molpcba", "ogbg-moltox21", "ogbg-molfreesolv"]
Expand Down Expand Up @@ -423,10 +424,10 @@ def test_splits_file(self):
self.assertEqual(len(ds.val_ds), len(split_val))
self.assertEqual(len(ds.test_ds), len(split_test))

try:
try:
# Create a TemporaryFile to save the splits, and test the datamodule
temp_file = tempfile.NamedTemporaryFile(suffix=".pt", delete=False)

# Save the splits
torch.save(splits, temp_file)

Expand Down Expand Up @@ -470,7 +471,7 @@ def test_splits_file(self):
)
np.testing.assert_array_equal(ds.val_ds.smiles_offsets_tensor, ds2.val_ds.smiles_offsets_tensor)
np.testing.assert_array_equal(ds.test_ds.smiles_offsets_tensor, ds2.test_ds.smiles_offsets_tensor)

finally:
temp_file.close()
os.unlink(temp_file.name)
Expand Down

0 comments on commit 03a1a5f

Please sign in to comment.