diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index e1a11628..c15a3473 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -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 diff --git a/tests/test_datamodule.py b/tests/test_datamodule.py index 9edb24e1..18e90b79 100644 --- a/tests/test_datamodule.py +++ b/tests/test_datamodule.py @@ -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) @@ -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)