File tree Expand file tree Collapse file tree 1 file changed +5
-4
lines changed Expand file tree Collapse file tree 1 file changed +5
-4
lines changed Original file line number Diff line number Diff line change 1818
1919def _unzip_model_data (temp_dir : str ):
2020 """Unzip the model data to the given directory.
21-
21+
2222 Args:
2323 temp_dir: Path to the temporary directory to extract the model data to
2424
2525 Returns:
2626 Path to the directory containing the extracted model data
2727 """
2828 model_path = Path (temp_dir ) / "model"
29- with zipfile .ZipFile (Path (__file__ ).parent / "test_model_data.zip" , 'r' ) as zip_ref :
29+ with zipfile .ZipFile (Path (__file__ ).parent / "test_model_data.zip" , "r" ) as zip_ref :
3030 zip_ref .extractall (model_path )
3131 return model_path
32+
33+
3234class TestDataLoading (TestCase ):
3335 """Test a real model with data loading and saving functionality."""
3436
3537 def test_load_save (self ):
3638 """Set up test model with data."""
3739
38-
3940 with tempfile .TemporaryDirectory () as temp_dir :
4041 model_path = _unzip_model_data (temp_dir )
41-
42+
4243 model = Model ()
4344 model .load (model_path )
4445 results = model .run (dates = model .dates [0 :3 ])
You can’t perform that action at this time.
0 commit comments