You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@aurora.apache.org by "Joe Smith (JIRA)" <ji...@apache.org> on 2014/10/16 07:31:33 UTC
[jira] [Commented] (AURORA-510) Investigate a way to mock patch
threading.Event in unit tests
[ https://issues.apache.org/jira/browse/AURORA-510?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14173391#comment-14173391 ]
Joe Smith commented on AURORA-510:
----------------------------------
The solution is to indeed patch _Event, unless threading changes how it does things.
> Investigate a way to mock patch threading.Event in unit tests
> -------------------------------------------------------------
>
> Key: AURORA-510
> URL: https://issues.apache.org/jira/browse/AURORA-510
> Project: Aurora
> Issue Type: Task
> Components: Client
> Reporter: Maxim Khutornenko
> Priority: Minor
>
> The threading.Event is a factory method that returns a custom _Event object, which is python internal. We should not patch _Event in our unit tests but rather patch threading.Event directly. Ordinary ways of patching did not succeed. Seen a few blog complaints about mock dying silently under similar conditions possibly due to importing order. Investigate a possible solution here.
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)