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

@decorators.timeout breaks @mock.patch #188

Open
Nek opened this issue Apr 8, 2021 · 0 comments
Open

@decorators.timeout breaks @mock.patch #188

Nek opened this issue Apr 8, 2021 · 0 comments
Labels
bug Something isn't working

Comments

@Nek
Copy link

Nek commented Apr 8, 2021

Environment

  • klio* version: 21.2.0rc1
  • Operating System: macOS Big Sur 11.2.3
  • Python version: 3.8.7
  • Docker version: 3.2.2

Description of the bug

Adding @decorators.timeout(seconds=30) to the process method of ProcessEncode class breaks @mock.patch decorator.
In my case, I have @mock.patch("google.cloud.storage.Blob") and it stops working after I add @decorators.timeout to process.

What you expected to happen

I expect Blob mock to be injected and its methods to be called and assertable in the tests.

How to reproduce (as minimally and precisely as possible)

Add @decorators.timeout to the process method that calls Blob's mocked method and observe it not being called anymore.

@Nek Nek added the bug Something isn't working label Apr 8, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant