Open lawik opened 5 years ago
This would benefit from #30
How would this benefit from #30?
I'd say we want numbers to remain literals and not references in our tests. If our tests and production code refer to the same values, we are not testing that the right values are being passed to the devices, making the tests weaker.
Being consistent in how we represent our integers is all fine and well, but going beyond that doesn't have clear benefits to me.
Okay, that's fair. I agree that literals are probably the way to go. But I think module attributes in the test suite would be beneficial to clarity and reduce the risk of a hexadecimal number being replaced because it is identical but used for a different purpose in a different context. I think that risk is reduced with using module attributes in the test module as opposed to repeating the literals in every test.
What do you think about that approach?
Sounds good!
Currently we have things like:
While the command being sent is provided in hex:
0x3C is output as 60 and that's why things are this way right now. We should probably change it so that the connection remains clear.