Skip to content

Commit

Permalink
trying to fix pytest fixture
Browse files Browse the repository at this point in the history
  • Loading branch information
Andrewq11 committed Nov 13, 2024
1 parent affba94 commit 62065fb
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions tests/test_datamodule.py
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@

class test_DataModule(ut.TestCase):

@pytest.fixture(autouse=True)
@pytest.fixture
def _setup_tmp_path(self, tmp_path):
self.tmp_path = tmp_path

Expand Down Expand Up @@ -385,8 +385,8 @@ def test_datamodule_multiple_data_files(self):

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

@pytest.fixture
def test_splits_file(self, tmp_path):
@pytest.mark.usefixtures("_setup_tmp_path")
def test_splits_file(self):
# Test single CSV files
csv_file = "tests/data/micro_ZINC_shard_1.csv"
df = pd.read_csv(csv_file)
Expand Down

0 comments on commit 62065fb

Please sign in to comment.