From 8924b438683f41f551761ca991d1d1d2f997bb1f Mon Sep 17 00:00:00 2001 From: Zhengfei Wang <38847871+zhengfeiwang@users.noreply.github.com> Date: Wed, 8 Nov 2023 15:47:27 +0800 Subject: [PATCH] [promptflow][Test] Skip known enum issue in test when Python 3.11 (#1040) # Description Skip test `test_ensure_node_inputs_type` in Python 3.11 due to known enum issue. # All Promptflow Contribution checklist: - [x] **The pull request does not introduce [breaking changes].** - [ ] **CHANGELOG is updated for new features, bug fixes or other significant changes.** - [x] **I have read the [contribution guidelines](../CONTRIBUTING.md).** - [ ] **Create an issue and link to the pull request to get dedicated review from promptflow team. Learn more: [suggested workflow](../CONTRIBUTING.md#suggested-workflow).** ## General Guidelines and Best Practices - [x] Title of the pull request is clear and informative. - [x] There are a small number of commits, each of which have an informative message. This means that previously merged commits do not appear in the history of the PR. For more information on cleaning up the commits in your PR, [see this page](https://github.com/Azure/azure-powershell/blob/master/documentation/development-docs/cleaning-up-commits.md). ### Testing Guidelines - [x] Pull request includes test coverage for the included changes. --------- Co-authored-by: Hhhilulu <115983968+Hhhilulu@users.noreply.github.com> --- .../tests/executor/unittests/executor/test_tool_resolver.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/promptflow/tests/executor/unittests/executor/test_tool_resolver.py b/src/promptflow/tests/executor/unittests/executor/test_tool_resolver.py index 66c89a95313..f0897d524a4 100644 --- a/src/promptflow/tests/executor/unittests/executor/test_tool_resolver.py +++ b/src/promptflow/tests/executor/unittests/executor/test_tool_resolver.py @@ -153,6 +153,10 @@ def test_resolve_tool_by_node_with_duplicated_inputs(self, resolver, mocker): assert isinstance(exec_info.value.inner_exception, NodeInputValidationError) assert "These inputs are duplicated" in exec_info.value.message + @pytest.mark.skipif( + condition=(sys.version_info.major == 3 and sys.version_info.minor == 11), + reason="BUG 2709800: known issue on enum in Python 3.11", + ) def test_ensure_node_inputs_type(self): # Case 1: conn_name not in connections, should raise conn_name not found error tool = Tool(name="mock", type="python", inputs={"conn": InputDefinition(type=["CustomConnection"])})