-
Notifications
You must be signed in to change notification settings - Fork 23
Full test coverage multiaddr and fixes #9
Full test coverage multiaddr and fixes #9
Conversation
Current coverage is 90.34%
@@ master #9 diff @@
==========================================
Files 5 5
Lines 353 352 -1
Methods 0 0
Messages 0 0
Branches 63 61 -2
==========================================
+ Hits 306 318 +12
+ Misses 30 21 -9
+ Partials 17 13 -4
|
I don't understand why this codecov is complaining about this change... |
self._bytes = bytes_addr | ||
else: | ||
raise ValueError("Invalid address type, must be bytes or str") | ||
raise ValueError("Invalid address type, must be bytes xor str") |
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 don't like this wording change, it reads like the user is supposed to pass in b'foo' ^ "bar"
. I think most people parse or
as an exclusive or, anyway.
Really I ought to fix this constructor to only take a single parameter, but the way python handles bytes and strings makes it basically impossible.
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.
Understood. I struggled a bit with that. Yes, it would be much better if only one parameter was taken as an input, but like you said not sure of a good way to do that works in both python 2 and 3.
Thanks for the PR! Patches that add a bunch of tests are my favorite :) I'm looking in to the codecov failure. I think I misconfigured it when I set it up. Please address my comments and rebase against master. I think master should fix the codecov issue. |
…rror being thrown if other addr not present in self
Updates made and rebase done. |
LGTM, thanks for the patch! I'm going to ignore the codecov failure. I'm still not sure why it's happening. I'll add you to |
I have gotten an interest in ipfs and enhancing python and landed here.
Added some unit tests and found an issue in multiaddr.decapsulate throwing a ValueError.