IndexSeek commented on code in PR #1464:
URL: https://github.com/apache/iceberg-python/pull/1464#discussion_r1897973076


##########
tests/utils/test_config.py:
##########
@@ -93,3 +94,61 @@ def 
test_from_configuration_files_get_typed_value(tmp_path_factory: pytest.TempP
 
     assert Config().get_bool("legacy-current-snapshot-id")
     assert Config().get_int("max-workers") == 4
+
+
+@pytest.mark.parametrize(
+    "config_location, config_content, expected_result",
+    [
+        (
+            "config",
+            {"catalog": {"default": {"uri": "https://service.io/api"}}},
+            {"catalog": {"default": {"uri": "https://service.io/api"}}},
+        ),
+        (
+            "home",
+            {"catalog": {"default": {"uri": "https://service.io/api"}}},
+            {"catalog": {"default": {"uri": "https://service.io/api"}}},
+        ),
+        (
+            "current",
+            {"catalog": {"default": {"uri": "https://service.io/api"}}},
+            {"catalog": {"default": {"uri": "https://service.io/api"}}},
+        ),
+        ("none", None, None),
+    ],
+)
+def test_from_multiple_configuration_files(
+    monkeypatch: pytest.MonkeyPatch,
+    tmp_path_factory: pytest.TempPathFactory,
+    config_location: str,
+    config_content: Optional[Dict[str, Any]],
+    expected_result: Optional[Dict[str, Any]],
+) -> None:
+    def create_config_file(directory: str, content: Optional[Dict[str, Any]]) 
-> None:
+        config_file_path = os.path.join(directory, ".pyiceberg.yaml")
+        with open(config_file_path, "w", encoding="utf-8") as file:

Review Comment:
   This was adjusted in 
https://github.com/apache/iceberg-python/pull/1464/commits/fe029fe40340186363bd4031ebb07a2219336d72.
 



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscr...@iceberg.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscr...@iceberg.apache.org
For additional commands, e-mail: issues-h...@iceberg.apache.org

Reply via email to