Skip to content

@decorators.timeout breaks @mock.patch #188

@Nek

Description

@Nek

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions