chrisqiqiu commented on code in PR #3206:
URL: https://github.com/apache/iceberg-python/pull/3206#discussion_r3028838378
##########
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
Review Comment:
You mean we'd better use result.stdout so that we can keep original exact
match assertion , right? I have updated it. Happy to change if there's a
preferred approach.
--
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]