Closed claws closed 9 years ago
Cool! Thank you!
But some tests failed. I won't merge it until they all run successfully
:beers:
Fixed the typo in the repr test. Not really sure why I had to fix the two get_temperature test methods that were failing due to sure comparing a float to an int and failing (e.g. 20 != 20.0). I didn't touch that code. From the commented out code in those functions it looks like you've had trouble in that area before. Anyway, tests are passing now.
Thank you!
The problem with the already failed test cases is a new sure
version which allows to compare floats with an epsilon.
This pull request adds some common object utilities (
__str__
and__repr__
) allowing the W1ThermSensor object to be nicely printed, providing a more meaningful output than the existing default.For example, the output from this snippet:
will change from:
to this: