-
-
Notifications
You must be signed in to change notification settings - Fork 101
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
Refactor unit tests #167
Refactor unit tests #167
Conversation
I'd give Regarding the rest of refactoring, let's invite @igneus to try splitting the scope somehow, since he was going to do additional PR as well. |
Codecov Report
@@ Coverage Diff @@
## master #167 +/- ##
==========================================
- Coverage 100% 99.69% -0.31%
==========================================
Files 4 4
Lines 329 329
==========================================
- Hits 329 328 -1
- Misses 0 1 +1
Continue to review full report at Codecov.
|
I don't think I have anything helpful to say right now. "Splitting the scope" is a task quite a few levels above my current level of understanding of the code in question. |
@igneus would you wait for @gagoman to finish this PR then? |
@gagoman could you please apply your changes to existing files rather than creating new |
Sure. To be honest: I had no real plans concerning the "true refactoring" phase of the work (beyond removing unittest) and my attempt to approach it before I learned about @gagoman 's work on this PR hasn't resulted in anything worth a commit -- stuff just got more complicated than it had been originally. It seems I can't really "think the pytest way" yet when it comes to fixtures and parametrization. |
@gagoman please not only add new tests but drop obsolete unittest styled ones. |
d4602bf
to
949779e
Compare
* moved multidict tests to test_mutable_multidict * moved types tests to test_types
949779e
to
2594ce8
Compare
Feel free to review. This is quite a big change though. Now there would be more tests, as previously I have some questions that I've placed in PR body. |
CIMultiDict, | ||
istr | ||
) | ||
def chained_ctor(_multidict_module, impls): |
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.
I cannot guess what this function name stands for. Could you plz think of its improvement? Explicit is better, than implicit.
Oh.. and it would be great it you could add docstrings.
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.
Sure, will do. Any preference on name?
I'll review it closer a bit later, but at glance it looks cleaner now :) |
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.
Looks good but replaced tests should be deleted.
@asvetlov could you please elaborate? Which tests? There are no duplicates atm. |
@gagoman nevermind. Missed collapsed file |
thanks! |
Changes:
_BaseMutableMultiDictTests
are atTestMutableMultiDict
TestNonProxyCIMultiDict#test_extend_with_istr
was moved toTestMutableMultiDict
_TestProxy/_TestCIProxy#test_copy
was moved totest_proxy_copy
Questions:
sorted
?_CIMultiDictTests
was inherited from_Root
and not_BaseTest
test__iter__types
was done only for non-ci dicts. Should I add CI classes?