Skip to content

Commit

Permalink
updating failing test on windows
Browse files Browse the repository at this point in the history
  • Loading branch information
Andrewq11 committed Nov 12, 2024
1 parent 050829d commit 17346f8
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
1 change: 1 addition & 0 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,7 @@ jobs:
create-args: >-
python=${{ matrix.python-version }}
# To prevent issues where Windows will re-use old/cached versions of RDKit
- name: Update rdkit version
run: |
micromamba install --force-reinstall rdkit=2024.03.4
Expand Down
4 changes: 2 additions & 2 deletions tests/test_datamodule.py
Original file line number Diff line number Diff line change
Expand Up @@ -380,7 +380,7 @@ def test_datamodule_multiple_data_files(self):

self.assertEqual(len(ds.train_ds), 20)

def test_splits_file(self):
def test_splits_file(self, tmp_path):
# Test single CSV files
csv_file = "tests/data/micro_ZINC_shard_1.csv"
df = pd.read_csv(csv_file)
Expand Down Expand Up @@ -424,7 +424,7 @@ def test_splits_file(self):
self.assertEqual(len(ds.test_ds), len(split_test))

# Create a TemporaryFile to save the splits, and test the datamodule
with tempfile.NamedTemporaryFile(suffix=".pt") as temp:
with tempfile.NamedTemporaryFile(suffix=".pt", dir=tmp_path) as temp:
# Save the splits
torch.save(splits, temp)

Expand Down

0 comments on commit 17346f8

Please sign in to comment.