-
Notifications
You must be signed in to change notification settings - Fork 13
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
fix the output formatting of table mode #30
Conversation
Looks like the failures are due to upper/lower case hex. This should not be an issue, but I will change %x to %X to get the same casing as before. |
Hi @rohoog, thanks for creating a PR to address #29, really appreciate it. You can have a look at Regarding the python format string vs printf style, I rather would like to keep the format string one, but I will be happy to help you out there if you want me to. In case you want to dig into it by yourself first these links may help: At first glance I think the alignment within the format string is the issue best |
I am not such a python guru as you might think... |
@rohoog
No problem I will guide you if you are interested in getting your PR integrated. |
Could it even be that the expected output for the crc8 poly 0x1D is actually wrong? So that just fixing that one will 'test' it properly? I see no values starting with 0x0 (except for 0x00), while there should definitely be some. |
OK done that as well. |
Implementation result driven testing instead of test driven development.... 😕 |
I need to hit the bed now. As soon as I can I will validate that outputted tables are correct. If we only would add without checking I agree it would not really a "test". |
Hurray! Success! |
@@ -29,38 +29,38 @@ def test_table_subcommand_with_no_additional_arguments(self): | |||
|
|||
def test_table_generation_for_width_8_and_poly_0x1D(self): | |||
expected_output = io.StringIO(inspect.cleandoc(""" |
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 have checked the table, looks like the one you added is correct. Apparently this test was setup incorrectly.
See issue #29
Sorry I'm not familiar with this
more pythonic.format method; I used the trusty old printf style 'interpolation' instead.