arminnajafi commented on PR #6445: URL: https://github.com/apache/iceberg/pull/6445#issuecomment-1385007961
One more mock is needed to make it work: ``` with mock.patch('pyiceberg.catalog._ENV_CONFIG', Config()): ``` ``` def test_missing_uri(empty_home_dir_path: str) -> None: # mock to prevent parsing ~/.pyiceberg.yaml or {PYICEBERG_HOME}/.pyiceberg.yaml with mock.patch.dict(os.environ, {"HOME": empty_home_dir_path, "PYICEBERG_HOME": empty_home_dir_path}): with mock.patch('pyiceberg.catalog._ENV_CONFIG', Config()): runner = CliRunner() result = runner.invoke(run, ["list"]) assert result.exit_code == 1 assert ( result.output == "URI missing, please provide using --uri, the config or environment variable \nPYICEBERG_CATALOG__DEFAULT__URI\n" ) ``` ``` > make test ... 1519 passed, 22 deselected, 1 warning in 6.14s ``` I'll send a PR. -- 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