-
Notifications
You must be signed in to change notification settings - Fork 112
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
Implemented mock support #53
Implemented mock support #53
Conversation
Codecov Report
@@ Coverage Diff @@
## master #53 +/- ##
==========================================
- Coverage 100% 97.82% -2.18%
==========================================
Files 1 1
Lines 107 138 +31
==========================================
+ Hits 107 135 +28
- Misses 0 3 +3
Continue to review full report at Codecov.
|
Hey thanks for this! Without having yet looked into the details, this seems like a good contribution. Would you mind updating the documentation as well? I will review the implementation details. |
Have you considered using |
@txels, heyo! I think you are rigth with Let me time to refactor my stuff: I need remember Thanks you a lot for payin attention on my pull request. |
@dmytrostriletskyi Hi, are you still interested in this? |
Continuing this effort in another PR to fix and clean up some stuff. Closing this. |
Hello! I frequency use
ddt
andmock
together in my development.I always missed some features in testing, that can make me feel more comfortable.
What is new?
I implemented decorator
mockdata
, that may be uses additional to commondata
andunpack
.This decorator says, that arguments in data values may be mock's
patch
object and related to it (after process it becomeMagicMock
) attributes likereturn_value
andside_effect
(optional).Usage
Simple example with arguments.
Another one.
Example, where you can see, that
Mock
appliedside_effect
in background and you get result right away without applying it by yourself.