Add codec unit tests - #13
Conversation
Sounds good to me! |
|
Alright I think this is ready now. |
|
@fredthomsen Sorry for the delay! I just started a new job so I haven't had much free time. I'm reviewing this now. |
|
|
||
|
|
||
| @pytest.mark.parametrize("buf, expected", [ | ||
| (b'047f0000011104d2047f0000010610e1', [b'\x04\x7f\x00\x00\x01', b'\x11\x04\xd2', b'\x04\x7f\x00\x00\x01', b'\x06\x10\xe1']), # "/ip4/127.0.0.1/udp/1234/ip4/127.0.0.1/tcp/4321" |
There was a problem hiding this comment.
nit: Please break this up onto multiple lines. I haven't yet set up a lint checker on travis, but I use flake8 locally to ensure a uniform style. If you could, please run make clean lint on your branch and correct any lint complaints. (the clean is because I slightly misconfigured flake8 and it'll try to lint pyc files if present)
There was a problem hiding this comment.
I use the flake8 plugin in vim, but I tend to ignore line warnings... lol.
What is the best way to deal with a long string that exceeds 80 characters? I see a number of different methods suggested online and not sure that you have a preference.
|
@fredthomsen Thanks very much for the tests! Sorry, again, for the delay reviewing them. The only problems I see are just lint/style issues. |
Current coverage is 94.94%@@ master #13 diff @@
==========================================
Files 5 5
Lines 352 356 +4
Methods 0 0
Messages 0 0
Branches 61 62 +1
==========================================
+ Hits 318 338 +20
+ Misses 21 10 -11
+ Partials 13 8 -5
|
|
@sbuss should multi_addr.util.int_to_hex return a binary string? What's the right approach here? I am having some issues. EDIT: I think I resolved this. |
|
Ok... really ready this time. |
|
This is excellent, @fredthomsen! Thanks for doing this! |
Started breaking this out into another test file. Not done yet, but I just wanted to see if you were good with this.