enthought / enthought/traits

Provide better mocking support for methods on HasTraits classes

Open
#1,621 0 comments 0 reactions 0 assignees View on GitHub
type: enhancement
Dominant language
Python
Stars
462
Forks
90
PR merge metrics
No merged PRs in 30d

Description

Mocking methods on HasTraits classes is currently painful; there's a workaround explained in the documentation, but it would be nice to have a way to do this more directly.

Suggestion: we make available a context manager, similar to `mock.patch.object` in signature, that allows patching of a method on a `HasTraits` object.

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.