geruh commented on code in PR #2404:
URL: https://github.com/apache/iceberg-python/pull/2404#discussion_r2596133013


##########
tests/integration/test_deletes.py:
##########
@@ -43,7 +43,7 @@ def run_spark_commands(spark: SparkSession, sqls: list[str]) 
-> None:
 def test_table(session_catalog: RestCatalog) -> Generator[Table, None, None]:
     identifier = "default.__test_table"
     arrow_table = pa.Table.from_arrays([pa.array([1, 2, 3, 4, 5]), 
pa.array(["a", "b", "c", "d", "e"])], names=["idx", "value"])
-    test_table = session_catalog.create_table(
+    test_table = session_catalog.create_table_if_not_exists(

Review Comment:
   Do we need this change? 



##########
tests/catalog/test_rest.py:
##########
@@ -1017,6 +1036,25 @@ def test_drop_table_404(rest_mock: Mocker) -> None:
     assert "Table does not exist" in str(e.value)
 
 
+def test_drop_table_404_non_existent_namespace(rest_mock: Mocker) -> None:
+    rest_mock.delete(
+        f"{TEST_URI}v1/namespaces/fokko/tables/does_not_exists",
+        json={
+            "error": {
+                "message": "Table does not exist: fokko.does_not_exists in 
warehouse 8bcb0838-50fc-472d-9ddb-8feb89ef5f1e",
+                "type": "NoSuchNamespaceErrorException",
+                "code": 404,
+            }
+        },
+        status_code=404,
+        request_headers=TEST_HEADERS,
+    )
+
+    with pytest.raises(NoSuchNamespaceError) as e:
+        RestCatalog("rest", uri=TEST_URI, 
token=TEST_TOKEN).drop_table(("fokko", "does_not_exists"))

Review Comment:
   lol



-- 
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: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to