Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Adding missing inits in tests to correct binding load errors #1354

Merged
merged 1 commit into from
Nov 14, 2023

Conversation

vrdmr
Copy link
Member

@vrdmr vrdmr commented Nov 14, 2023

Description

Fixing the following UT errors

FAILED tests/unittests/test_dispatcher.py::TestThreadPoolSettingsPython37::test_dispatcher_sync_threadpool_set_worker - AssertionError: 0 != 1 : stack_trace: "  File \"/home/runner/work/azure-functions-python-worker/azure-functions-python-worker/azure_functions_worker/dispatcher.py\", line 399, in _handle__function_load_request\n    self._functions.add_function(\n  File \"/home/runner/work/azure-functions-python-worker/azure-functions-python-worker/azure_functions_worker/functions.py\", line 338, in add_function\n    input_types, output_types = self.validate_function_params(params,\n  File \"/home/runner/work/azure-functions-python-worker/azure-functions-python-worker/azure_functions_worker/functions.py\", line 228, in validate_function_params\n    raise FunctionLoadError(\n"
message: "FunctionLoadError: cannot load the show_context function: type of req binding in function.json \"httpTrigger\" does not match its Python annotation \"HttpRequest\""
FAILED tests/unittests/test_dispatcher.py::TestThreadPoolSettingsPython37::test_sync_invocation_request_log_threads - AssertionError: 0 != 1 : stack_trace: "  File \"/home/runner/work/azure-functions-python-worker/azure-functions-python-worker/azure_functions_worker/dispatcher.py\", line 399, in _handle__function_load_request\n    self._functions.add_function(\n  File \"/home/runner/work/azure-functions-python-worker/azure-functions-python-worker/azure_functions_worker/functions.py\", line 338, in add_function\n    input_types, output_types = self.validate_function_params(params,\n  File \"/home/runner/work/azure-functions-python-worker/azure-functions-python-worker/azure_functions_worker/functions.py\", line 228, in validate_function_params\n    raise FunctionLoadError(\n"
message: "FunctionLoadError: cannot load the show_context function: type of req binding in function.json \"httpTrigger\" does not match its Python annotation \"HttpRequest\""

Fixes #


PR information

  • The title of the PR is clear and informative.
  • There are a small number of commits, each of which has an informative message. This means that previously merged commits do not appear in the history of the PR. For information on cleaning up the commits in your pull request, see this page.
  • If applicable, the PR references the bug/issue that it fixes in the description.
  • New Unit tests were added for the changes made and CI is passing.

Quality of Code and Contribution Guidelines

Copy link

codecov bot commented Nov 14, 2023

Codecov Report

All modified and coverable lines are covered by tests ✅

Comparison is base (a86adb4) 85.51% compared to head (d90a732) 32.11%.

❗ Current head d90a732 differs from pull request most recent head 94811c5. Consider uploading reports for the commit 94811c5 to get more accurate results

Additional details and impacted files
@@             Coverage Diff             @@
##              dev    #1354       +/-   ##
===========================================
- Coverage   85.51%   32.11%   -53.41%     
===========================================
  Files          34       34               
  Lines        1940     1940               
  Branches      367      366        -1     
===========================================
- Hits         1659      623     -1036     
- Misses        211     1316     +1105     
+ Partials       70        1       -69     
Flag Coverage Δ
unittests 32.11% <ø> (-53.36%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@vrdmr vrdmr merged commit 7a4635c into dev Nov 14, 2023
53 checks passed
@vrdmr vrdmr deleted the vameru/fix-show-context-tests branch November 14, 2023 06:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants