Skip to content

Commit 17346f8

Browse files
committed
updating failing test on windows
1 parent 050829d commit 17346f8

File tree

2 files changed

+3
-2
lines changed

2 files changed

+3
-2
lines changed

.github/workflows/test.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -54,6 +54,7 @@ jobs:
5454
create-args: >-
5555
python=${{ matrix.python-version }}
5656
57+
# To prevent issues where Windows will re-use old/cached versions of RDKit
5758
- name: Update rdkit version
5859
run: |
5960
micromamba install --force-reinstall rdkit=2024.03.4

tests/test_datamodule.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -380,7 +380,7 @@ def test_datamodule_multiple_data_files(self):
380380

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

383-
def test_splits_file(self):
383+
def test_splits_file(self, tmp_path):
384384
# Test single CSV files
385385
csv_file = "tests/data/micro_ZINC_shard_1.csv"
386386
df = pd.read_csv(csv_file)
@@ -424,7 +424,7 @@ def test_splits_file(self):
424424
self.assertEqual(len(ds.test_ds), len(split_test))
425425

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

0 commit comments

Comments
 (0)