Skip to content

Commit

Permalink
Fixing the enum related failing test under python 3.11 (#1402)
Browse files Browse the repository at this point in the history
# Description

This is to fixing the failing test: test_reference_code under python
3.11

# 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.
- [ ] 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.
  • Loading branch information
chw-microsoft authored Dec 7, 2023
1 parent 0b18ee6 commit dae7ec1
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -624,10 +624,10 @@ def test_reference_code(self):
raise_tool_execution_error()

e = e.value
assert e.reference_code == ErrorTarget.TOOL
assert e.reference_code == ErrorTarget.TOOL.value
module = "promptflow_vectordb.tool.faiss_index_loopup"
e.module = module
assert e.reference_code == f"{ErrorTarget.TOOL}/{module}"
assert e.reference_code == f"{ErrorTarget.TOOL.value}/{module}"

@pytest.mark.parametrize(
"func_that_raises_exception",
Expand Down

0 comments on commit dae7ec1

Please sign in to comment.