1515# specific language governing permissions and limitations
1616# under the License.
1717import os
18+ from typing import Any , Dict , Optional
1819from unittest import mock
1920
2021import pytest
@@ -117,9 +118,13 @@ def test_from_configuration_files_get_typed_value(tmp_path_factory: pytest.TempP
117118 ],
118119)
119120def test_from_multiple_configuration_files (
120- monkeypatch : pytest .MonkeyPatch , tmp_path_factory : pytest .TempPathFactory , config_location , config_content , expected_result
121- ):
122- def create_config_file (directory : str , content : dict ) -> None :
121+ monkeypatch : pytest .MonkeyPatch ,
122+ tmp_path_factory : pytest .TempPathFactory ,
123+ config_location : str ,
124+ config_content : Optional [Dict [str , Any ]],
125+ expected_result : Optional [Dict [str , Any ]],
126+ ) -> None :
127+ def create_config_file (directory : str , content : Optional [Dict [str , Any ]]) -> None :
123128 config_file_path = os .path .join (directory , ".pyiceberg.yaml" )
124129 with open (config_file_path , "w" , encoding = "utf-8" ) as file :
125130 yaml_str = as_document (content ).as_yaml () if content else ""
@@ -144,6 +149,6 @@ def create_config_file(directory: str, content: dict) -> None:
144149 if config_location == "current" :
145150 monkeypatch .chdir (current_path )
146151
147- assert (
148- Config (). _from_configuration_files () == expected_result
149- ), f"Unexpected configuration result for content: { config_content } "
152+ assert Config (). _from_configuration_files () == expected_result , (
153+ f"Unexpected configuration result for content: { config_content } "
154+ )
0 commit comments