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

patch functions only work as context managers #24

Open
blaix opened this issue Mar 14, 2017 · 2 comments
Open

patch functions only work as context managers #24

blaix opened this issue Mar 14, 2017 · 2 comments

Comments

@blaix
Copy link
Owner

blaix commented Mar 14, 2017

The tdubs patch functions are just pass throughs to python's mock.patch, but I don't know if all the supported arguments to that work with tdubs doubles, and I haven't tested them as decorators or using start/stop

@blaix blaix changed the title Check that all patch parameters work patch functions need more testing Mar 14, 2017
@blaix
Copy link
Owner Author

blaix commented Oct 18, 2017

My naive initial implementation only works as a context manager. There's a lot more work to do to make it work as a class or function decorator (dang).

Need to decide: update docs to explicitly only support using patch as a context manager, or do the work to make it work just like python's patch?

@blaix blaix changed the title patch functions need more testing patch functions only work as context managers Oct 18, 2017
@blaix
Copy link
Owner Author

blaix commented Oct 22, 2018

I'm just going to remove it and go back to the old method of saying pass a tdubs object as the new value on unittest's patch.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant