-
-
Notifications
You must be signed in to change notification settings - Fork 102
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
Remove unittest (was: Refactor test suite) #161
Conversation
* quite a few cases have been lost along the way, find out where!
tests/test_multidict.py
Outdated
self.assertEqual( | ||
str(d), | ||
assert( | ||
str(d) == | ||
"<%s('key': 'one', 'key': 'two')>" % cls.__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.
You'd better do expected = "<%s('key': 'one', 'key': 'two')>" % cls.__name__
one line above instead of having multiline expression for the sake of readability
tests/test_multidict.py
Outdated
|
||
def test_eq(self): | ||
d1 = self.make_dict(Key='val') | ||
d2 = self.make_dict(KEY='val') | ||
|
||
self.assertEqual(d1, d2) | ||
assert d1 == d2 | ||
|
||
|
||
class TestPyMultiDictProxy(_TestProxy, unittest.TestCase): |
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.
You'll need to eliminate unittest.TestCase
here as well ;)
@igneus thanks for taking this task! We'll be waiting for the completed version :) |
tests/test_multidict.py
Outdated
[('key', 'one'), ('key', 'two'), ('key', 3)]) | ||
expected = [('key', 'one'), ('key', 'two'), ('key', 3)] | ||
assert list(d.items()) == expected | ||
assert list(d.items()) == expected # was the repetition intentional? |
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.
tests/test_multidict.py
Outdated
[('key', 'one'), ('key', 'two'), ('key', 3)]) | ||
expected = [('key', 'one'), ('key', 'two'), ('key', 3)] | ||
assert list(d.items()) == expected | ||
assert list(d.items()) == expected # was the repetition intentional? |
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.
Unittest is gone. Should I continue the "more serious" test refactoring in this PR, or do you prefer to review and merge this step before going on? |
@igneus it is much easier to keep track of small changes. I'd be glad to merge this one after review and proceed with separate PR |
Codecov Report
@@ Coverage Diff @@
## master #161 +/- ##
=====================================
Coverage 100% 100%
=====================================
Files 4 4
Lines 329 329
=====================================
Hits 329 329 Continue to review full report at Codecov.
|
tests/test_multidict.py
Outdated
[('key', 'one'), ('key', 'two'), ('key', 3)]) | ||
expected = [('key', 'one'), ('key', 'two'), ('key', 3)] | ||
assert list(d.items()) == expected | ||
assert list(d.items()) == expected # was the repetition intentional? |
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.
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.
Honestly I don't remember.
You could consider it as a test for stable items order but better to have a separate test for the case.
Let's just remove the line.
it's stuck for hours (and it's not the first time this issue appears) @asvetlov can we skip this check? |
Sure |
I've started working on #98 . I open this PR in order to allow maintainers to review continuously if they wish so.