diff --git a/src/imf_reader/weo/reader.py b/src/imf_reader/weo/reader.py index 4d5dc8f..a1df35c 100644 --- a/src/imf_reader/weo/reader.py +++ b/src/imf_reader/weo/reader.py @@ -146,7 +146,9 @@ def fetch_data(version: Optional[Version] = None) -> pd.DataFrame: version = validate_version(version) df = _fetch(version) logger.info(f"Data fetched successfully for version {version[0]} {version[1]}") - fetch_data.last_version_fetched = version # store the version fetched as function attribute + fetch_data.last_version_fetched = ( + version # store the version fetched as function attribute + ) return df # if no version is passed, generate the latest version and fetch the data diff --git a/tests/test_weo/test_reader.py b/tests/test_weo/test_reader.py index 1e176db..4837cdb 100644 --- a/tests/test_weo/test_reader.py +++ b/tests/test_weo/test_reader.py @@ -101,7 +101,6 @@ def test_fetch_data_attribute(mock_fetch, mock_gen_latest_version): assert reader.fetch_data.last_version_fetched == ("April", 2024) - @patch("imf_reader.weo.reader._fetch.cache_clear") def test_clear_cache(mock_cache_clear): """Test for clear_cache method."""