Skip to content
This repository was archived by the owner on Jun 17, 2023. It is now read-only.

Commit

Permalink
only test fetch_data if running on Python >= 3.8
Browse files Browse the repository at this point in the history
  • Loading branch information
sgbaird committed Nov 14, 2022
1 parent 62545ff commit abe9734
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions tests/test_mp_time_split.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
import sys
from os import path

import pytest
from matminer.utils.io import load_dataframe_from_json

from mp_time_split.core import MPTimeSplit, get_data_home
Expand All @@ -22,6 +24,7 @@
# )


@pytest.mark.skipif(sys.version_info < (3, 8), reason="requires Python 3.8+")
def test_data_snapshot_one_by_one():
dummy_expt_df_check = load_dataframe_from_json(dummy_data_path)
mpt = MPTimeSplit(num_sites=num_sites, elements=elements)
Expand All @@ -33,6 +36,7 @@ def test_data_snapshot_one_by_one():
)


@pytest.mark.skipif(sys.version_info < (3, 8), reason="requires Python 3.8+")
def test_get_train_and_val_data():
mpt = MPTimeSplit(num_sites=num_sites, elements=elements)
mpt.fetch_data(one_by_one=True)
Expand All @@ -51,6 +55,7 @@ def test_get_train_and_val_data():
return train_inputs, val_inputs, train_outputs, val_outputs


@pytest.mark.skipif(sys.version_info < (3, 8), reason="requires Python 3.8+")
def test_get_test_data():
mpt = MPTimeSplit(num_sites=num_sites, elements=elements)
mpt.fetch_data(one_by_one=True)
Expand Down

0 comments on commit abe9734

Please sign in to comment.