-
Notifications
You must be signed in to change notification settings - Fork 857
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
Add mocks for unit tests #1294
Add mocks for unit tests #1294
Conversation
Codecov Report
@@ Coverage Diff @@
## dev #1294 +/- ##
==========================================
- Coverage 57.19% 57.14% -0.05%
==========================================
Files 188 188
Lines 20716 20707 -9
Branches 1916 1917 +1
==========================================
- Hits 11849 11834 -15
- Misses 8400 8409 +9
+ Partials 467 464 -3
Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here. |
unit-tests/mocks/gdblib.py
Outdated
|
||
class GdbLib(types.ModuleType): | ||
def __init__(self, module_name): | ||
super(GdbLib, self).__init__(module_name) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
super(GdbLib, self).__init__(module_name) | |
super().__init__(module_name) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
lgtm; one note: maybe we should move unit-tests to tests/?
I was thinking of we should move the content of |
Sounds good to me. Btw we can have multiple conftest.py files afaik |
207e6c2
to
b73a139
Compare
@@ -0,0 +1,36 @@ | |||
import sys | |||
import types | |||
from unittest.mock import MagicMock |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Do you think mixing unittest
and pytest
will be okay?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yup, pytest is designed to work well with unittest
No description provided.