Skip to content

fix: Allow for blob & timer unit testing #286

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

Open
wants to merge 4 commits into
base: dev
Choose a base branch
from

Conversation

hallvictoria
Copy link
Contributor

@hallvictoria hallvictoria commented May 28, 2025

Currently, Blob (InputStream) and Timer (TimerRequest) types cannot be unit tested.

Doing something like req = func.TimerRequest() results in an error saying TypeError: Can't instantiate abstract class TimerRequest with abstract methods past_due. This is because both Blob and Timer are missing the abstract layer that the other types have. This change adds the layer, allowing for unit testing, but not changing any other details.

This change is already covered through our unit tests & does not impact current functionality.

Fixes Azure/azure-functions-python-worker#737

@hallvictoria hallvictoria marked this pull request as ready for review May 28, 2025 18:16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[BUG] It is not possible to unit test a Python timer function
1 participant