chrisqiqiu commented on code in PR #3206:
URL: https://github.com/apache/iceberg-python/pull/3206#discussion_r3028846458


##########
tests/cli/test_console.py:
##########
@@ -62,17 +62,41 @@ def 
test_hive_catalog_missing_uri_shows_helpful_error(mocker: MockFixture) -> No
     assert "'uri'" not in result.output
 
 
[email protected](
+    "ignore:Deprecated in 0.11.0, will be removed in 1.0.0. "
+    "Please use `pyiceberg --version` instead of `pyiceberg 
version`:DeprecationWarning"
+)
 def test_version_does_not_load_catalog(mocker: MockFixture) -> None:
     mock_load_catalog = mocker.patch("pyiceberg.cli.console.load_catalog", 
side_effect=Exception("should not be called"))
 
     runner = CliRunner()
     result = runner.invoke(run, ["version"])
 
     assert result.exit_code == 0
-    assert result.output == f"{__version__}\n"
+    assert __version__ in result.output
     mock_load_catalog.assert_not_called()
 
 
+def test_version_flag() -> None:
+    runner = CliRunner()
+    result = runner.invoke(run, ["--version"])
+
+    assert result.exit_code == 0
+    assert result.output == f"{__version__}\n"
+
+
+def test_version_command_emits_deprecation_warning(mocker: MockFixture) -> 
None:
+    mocker.patch("pyiceberg.cli.console.load_catalog")

Review Comment:
   i have removed it



-- 
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